# When one loop isn't enough
# for + for — nested loops, every combination

# ─────────────────────────────────────────────
# Basic nested loop — multiplication table
# ─────────────────────────────────────────────

for i in range(1, 4):
    for j in range(1, 4):
        print(f"{i} x {j} = {i * j}")

# 1 x 1 = 1
# 1 x 2 = 2
# 1 x 3 = 3
# 2 x 1 = 2
# ...
# outer runs 3 times — inner runs 3 times each — 9 total

# ─────────────────────────────────────────────
# What's really happening
# ─────────────────────────────────────────────

# i = 1 → inner loop runs: j = 1, 2, 3
# i = 2 → inner loop runs: j = 1, 2, 3
# i = 3 → inner loop runs: j = 1, 2, 3

# inner loop completes fully before outer moves on

# ─────────────────────────────────────────────
# Looping through two strings
# ─────────────────────────────────────────────

vowels = "aeiou"
word = "Bull"

for letter in word:
    for vowel in vowels:
        if letter == vowel:
            print(f"{letter} is a vowel")

# u is a vowel

# ─────────────────────────────────────────────
# Quick reference
# ─────────────────────────────────────────────

# for outer in sequence_a:      — 4 spaces
#     for inner in sequence_b:  — 8 spaces
#         block                 — 12 spaces
#
# inner loop completes fully before outer moves on
# total iterations = outer count x inner count
# each level adds 4 spaces of indentation
