2013年9月3日
摘要: zip经常会遇到截断问题,如:a = [1,2,3], b = [4,5,6,7],则zip(a,b) = [(1, 4), (2, 5), (3, 6)]可考虑使用map:map(lambda *row: list(row), a,b), 或者:map(None, a,b),得到:[(1, 4), (2, 5), (3, 6), (None, 7)] 阅读全文
posted @ 2013-09-03 11:48 andy071001 阅读(2724) 评论(2) 推荐(0) 编辑