来源:http://www.jb51.net/article/47956.htm

http://www.jb51.net/article/47978.htm  Python 列表(List)操作方法详解

http://www.jb51.net/article/47990.htm    Python 字典(Dictionary)操作详解

strip lstrip rstrip

传入的是一个字符数组,编译器去除两端所有相应的字符,直到没有匹配的字符,比如:
代码如下:

theString = 'saaaay yes no yaaaass'
print theString.strip('say')

更多相关文章

  1. 为什么Python的eval()拒绝这个多行字符串,我如何修复它?
  2. 第七章、Python字符编码
  3. 关于Python的编码注释# -*- coding:utf-8 -*- 详解
  4. python string_3 end 内建函数详解
  5. 详解Python中的from..import绝对导入语句
  6. 转python爬虫:BeautifulSoup 使用select方法详解
  7. python 中 字符串转换为数组,字典或表达式
  8. 使用python将图片转换为字符图片
  9. Python多行正则表达式忽略字符串中的n行

随机推荐

  1. Android跨进程通信IPC
  2. Android中webview加载的网页上的按钮点击
  3. Android(安卓)ZXing改横屏识别为竖屏识别
  4. Appium的安装及简单的使用介绍
  5. Android硬件加速问题
  6. Android如何监听开机广播和关机广播
  7. Android 系统简介
  8. android 中 多个Activity 的跳转 与传值
  9. ImageView之android:tint=" "属性方法作
  10. Google code android开源项目(四)