2016年11月9日

python strip()函数 介绍

摘要: 函数原型 声明:s为字符串,rm为要删除的字符序列 s.strip(rm) 删除s字符串中开头、结尾处,位于 rm删除序列的字符 s.lstrip(rm) 删除s字符串中开头处,位于 rm删除序列的字符 s.rstrip(rm) 删除s字符串中结尾处,位于 rm删除序列的字符 注意: 1. 当rm为 阅读全文

posted @ 2016-11-09 14:49 星河赵 阅读(630) 评论(0) 推荐(0) 编辑

如何在python3.3用 map filter reduce

摘要: 在3.3里,如果直接使用map(), filter(), reduce(), 会出现 >>> def f(x): return x % 2 != 0 and x % 3 != 0 >>> filter(f, range(2, 25)) <</span>filter object at 0x00000 阅读全文

posted @ 2016-11-09 14:40 星河赵 阅读(274) 评论(0) 推荐(0) 编辑

导航