python delete blank spaces from string code example Example: replacing spaces in a string python mystring.replace(" ", "_")