Concept
Infinite Loops & Ctrl+C
Every developer creates an accidental infinite loop:
python
while True:
print("Spamming text forever!")# 57. Infinite Loops & Ctrl+C Every developer creates an accidental infinite loop: ```python while True: print("Spamming text forever!") ``` When your terminal goes berserk, don't panic. Smash `Ctrl + C` on your keyboard. It sends an emergency interrupt signal that instantly assassinates the runaway Python process.
Checkpoint
How do you kill an infinite Python loop running wild in your terminal?
Practice
Write a loop `while True:` that prints `"Running once"` and immediately escapes using `break` so it doesn't run forever.
01
Tap code blocks below to assemble
Available Blocks