which mathod remove the white space in python code example
Example 1: replacing spaces in a string python
mystring.replace(" ", "_")
Example 2: python trim whitespace from end of string
>>> " xyz ".rstrip()
' xyz'
mystring.replace(" ", "_")
>>> " xyz ".rstrip()
' xyz'