📜  python结合嵌套for循环 - Python代码示例

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

代码示例1
from itertools import product
dice_sides = [1, 2, 3, 4, 5, 6]
coin_sides = ['Heads', 'Tails']

for die,coin in product(dice_sides, coin_sides):
    print(die,coin)