列表解析 如图所示: [(x,y) for x in a for y in b] 首先需要先,循环遍历右边的,然后继续遍历左边的。 那就等同于 for x in a: for y in b: tuple(a,b)