how to replace space to / in python code example Example: space to underscore python mystring.replace(" ", "_")