| Tutorial | Python |

Flow Control: break, continue, and pass

These statements modify the normal flow of execution inside a loop.

break: ends the current loop

for letter in "Python":
    if letter == "h":
        break
    print(letter)

Stops the loop when the letter "h" is found.

continue: skips to the next iteration

for number in range(5):
    if number == 2:
        continue
    print(number)

Skips number 2 but continues with the rest.

pass: does nothing (empty block)

for letter in "abc":
    pass  # Used as a placeholder

Ideal as a placeholder during development when certain logic has not yet been implemented.

| Tutorial | Python |