from itertools import product
l1 = [1, 2, 3]
l2 = [4, 5, 6]
combinatios = product(l1, l2)
print(combinatios)
<itertools.product object at 0xac696be8>
[程序已完成]
from itertools import product
a = [1, 2, 3]
b = [4, 5, 6]
for n in product(a, b):
print(n)
# 代码运行正确!