好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

python复杂列表生成式教程

本文主要讲解python列表生成式的实际运用实例!希望对初学者有帮助!

print [100*m+10*n+m for m in range(1,10) for n in range (0,10)]

L=[]
for x in range(1,10):
for y in range(10):
for z in range(1,10):
if x==z :
L.append(100*x+10*y+z)
print L

课程推荐:

Python在线视频教程

以上就是python复杂列表生成式教程的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于python复杂列表生成式教程的详细内容...

  阅读:39次