python how to remove all leading spaces from a string code example Example: replacing spaces in a string python mystring.replace(" ", "_")