📅  最后修改于: 2022-03-11 14:47:19.232000             🧑  作者: Mango
# Use zip() to generate an single iterable from 2 lists:
zip([1, 2, 3], ["a", "b", "c"]) >> [(1, "a"), (2, "b"), (3, "c")]
example:
xs = [some list]
ys = [some other list]
func(x,y): return some value
[func(x, y) for x, y in zip(xs, ys)]
will iterate over both lists simultaneously, running func() over
each pair of values