python去掉字符串中的空格

1、去掉所有的空格:
s = " Kobe Lee "
s.strip()

2、去掉左边的空格:
s = " Kobe Lee "
s.lstrip()

3、去掉右边的空格:
s = " Kobe Lee "
s.rstrip()

学习了