代码如下:
" xyz ".strip() # returns "xyz" " xyz ".lstrip() # returns "xyz " " xyz ".rstrip() # returns " xyz" " x y z ".replace(‘ ‘, ‘,‘) # returns ",x,y,z"
时间: 2024-10-06 14:47:01
代码如下:
" xyz ".strip() # returns "xyz" " xyz ".lstrip() # returns "xyz " " xyz ".rstrip() # returns " xyz" " x y z ".replace(‘ ‘, ‘,‘) # returns ",x,y,z"