how to get rid of underscore in string python code example Example: space to underscore python mystring.replace(" ", "_")