python 删除字符串 前后空格方法 删除左侧空格 lstrip() 删除右侧空格 rstrip() 删除前后空格 strip()
str = " python "
python 删除左侧空格
str.lstrip() # "python "
python 删除右侧空格
str.rstrip() # " python"
python 删除字符串 前后空格方法
str.strip() # "python"
str = " python "
python 删除左侧空格
str.lstrip() # "python "
python 删除右侧空格
str.rstrip() # " python"
python 删除字符串 前后空格方法
str.strip() # "python"