热门
rstrip():去除字符串右边指定的字符(默认为空格)
string = " Hello, World! " new_string = string.rstrip() print(new_string)