📜  列表python代码示例的笛卡尔积

📅  最后修改于: 2022-03-11 14:45:16.985000             🧑  作者: Mango

代码示例1
import itertools

somelists = [
   [1, 2, 3],
   ['a', 'b'],
   [4, 5]
]
for element in itertools.product(*somelists):
    print(element)