Python 列表综合

有注释

#!/usr/bin/python
#coding=gbk

listone=[2,3,4,5,6]
#复制并乘以大于2的数字
listtwo=[2*i for i in listone]
print listtwo
#把数字放入这个列表
listthree=[i for i in listone]
print listthree

 

posted @ 2013-03-09 11:41  墨迹哥's  阅读(245)  评论(0编辑  收藏  举报