zip()函数
a=zip(("a","b","c"),(1,2,3))
print(a)
执行结果
<zip object at 0x01EA93C8>
书上说zip()函数返回一个元组列表。为什么运行结果不是呢 教程用的python2,却用的python3 回复 2# ssfjhh
是python是3版的。。。 回复 2# ssfjhh
教程也是3 回复 4# tomer
哪本教程?发个链接过来看看。 Python3程序开发指南.第二版 list(a)
zip() in conjunction with the * operator can be used to unzip a list
页:
[1]