Simple python code to replace hyphen with underscore

Job ID: 33074710

Budget: $10 – $30 USD

I have a .txt file and excel file. containing a few thousand strings. I want a piece of phyton code to iterate over everything and replace hyphen with an underscore.