文章2015年7月16日Python 琐记二1. zip函数 zip函数接受任意多个(包括0个和1个)序列作为参数,返回一个tuple列表 x = [1, 2, 3] y = [4, 5, 6] z = [7, 8, 9] xyz = zip(x, y, z) print xyz [↗pythonprogramming language
文章2015年3月15日Python 琐记一1. BOOL Python 中bool类型把数0看作false bool(0) 2. range 最常用的函数range,可传递1、2或3个参数,只有1个则是下边界,两个就是上下边界,三个则加上了步长。 3. lambda 类似于函数式程↗pythonprogramming language