In my file header have variable name seperate i want replace space with under score in python code example Example: space to underscore python mystring.replace(" ", "_")