# python combine nested for loops

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)

**Here is what the above code is Doing:**

1. dice_sides = [1, 2, 3, 4, 5, 6]

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

1. dice_sides = [1, 2, 3, 4, 5, 6]

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

1. dice_sides = [1, 2, 3, 4, 5, 6]

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

1. dice_sides = [1, 2, 3, 4, 5, 6]

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,coin in product(dice_sides, coin_sides):

4. print(die,coin)

1. dice_sides = [1, 2, 3, 4, 5, 6]

2. coin_sides = [‘Heads’, ‘Tails’]

3. for die,