Using list comprehension in Python to do something similar to zip()?

后端 未结 5 1234
暖寄归人
暖寄归人 2021-02-04 14:05

I\'m a Python newbie and one of the things I am trying to do is wrap my head around list comprehension. I can see that it\'s a pretty powerful feature that\'s worth learning.

5条回答
  •  迷失自我
    2021-02-04 14:11

    A list comprehension, without some help from zip, map, or itertools, cannot institute a "parallel loop" on multiple sequences -- only simple loops on one sequence, or "nested" loops on multiple ones.

提交回复
热议问题