python remove underscore from string code example Example: python replace space with underscore mystring.replace(" ", "_")