python strip()
来源:互联网 发布:java从入门到放弃 pdf 编辑:程序博客网 时间:2024/05/01 18:58
参考:
http://www.jb51.net/article/37287.htm
###############################
s.strip(del) :在字符串s的开头结尾处,删除del中存在的字符
s.lstrip(del):在字符串s的开头处,删除del中存在的字符
s.rstrip(del):在字符串s的结尾处,删除del中存在的字符
s=' asdf ' #前后均有空格s.strip() #del为空表示默认删除空格s.lstrip()s.rstrip()
当del为空时,默认删除空白符(包括'\n','\t',' ')
s='asdf fdsa's.strip('as')s.strip('sa')s.strip('sd')
如何del不为空,则将字符串s开头或结尾处和del相同的字符删除
0 0
- python strip()
- python strip()
- python strip()
- python strip()
- python strip()
- python .strip()
- python strip
- [python]python strip()方法
- strip,lstrip,rstrip Python
- python- strip lstrip rstrip
- 关于python strip
- python strip()函数 介绍
- python 字符串之strip
- python strip()函数 介绍
- python strip()函数
- python中的strip函数
- python strip()函数 介绍
- python strip()函数
- File的使用方法
- 何时为尽头
- 引用/对象
- 一道简单OJ题目的五种编程语言
- SVN trunk、branch、tag的用法
- python strip()
- lower_bound函数
- RAC中经常使用的运算符 - 感谢听榆大叔的整理
- Quick sort 快速排序
- 浅析C++中的智能指针
- XPATH的几个常用函数
- Processing 教程(14) - 渐进地认识While Loop!
- LAMP实现一个简易网页应用
- ubuntu下openjdk环境配置