<human>:  How do I remove whitespace from the end of a string in Python?
<bot>: Here is some code to remove white spaces from the end of string "  xyz   "

"""  xyz   """.rstrip()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.