Understanding iterators and zip in python

后端 未结 0 1527
庸人自扰
庸人自扰 2021-02-05 22:25

Consider this for loop:

zipped = zip([1,2,3], [4,5,6])
for a, b in zipped:
    print(a, b)

This, as expected, returns:



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题