-
python的map和zip操作
-
2014-4-11 01:14
-
如果要将一个string list转换成int list (list里每个string都转成int),比如 view plain copy - 可以使用: view plain copy 或者使用map操作: map(func, list) 对list里的每个元素apply func. view plain copy ...
-
个人分类: python|3064 次阅读|没有评论
-
Python strip lstrip rstrip使用方法
-
2014-4-10 17:59
-
Python中的strip用于去除字符串的 首尾 字符,同理,lstrip用于去除 左边 的字符,rstrip用于去除 右边 的字符。 这三个函数都可传入一个参数,指定要去除的首尾字符。 需要注意的是,传入的是一个 字符数组 ,编译器去除两端所有相应的字符,直到没有匹配的字符,比如: theString ='saaaay yes no ...
-
个人分类: python|2821 次阅读|没有评论
本页有 8 篇博文因作者的隐私设置或未通过审核而隐藏