python中strip的用法

2025-05-09 18:40:59

1、strip()介绍:删除开头或是结尾的字符。

python中strip的用法

2、strip()删除开头空字符演示。使用形式:string.strip('开头空字符')

python中strip的用法

3、strip()删除结尾的空字符演示。使用形式:string.strip('结尾空字符')

python中strip的用法

4、strip()删除开头的一般字符。使用形式倦虺赳式:string.strip('开头一般字符')

python中strip的用法

5、strip()删除结尾的一般字符。使用形式:string.strip('结尾字符')

python中strip的用法
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
相关推荐
  • 阅读量:32
  • 阅读量:39
  • 阅读量:74
  • 阅读量:31
  • 阅读量:87
  • 猜你喜欢