removing a space in a string with .replace python code example Example: replacing spaces in a string python mystring.replace(" ", "_")