Step 1: Why Loops?
Imagine you have 1000 sales to print. You wouldn't write:
print(sale1)
print(sale2)
...1000 times!
Loops let you repeat actions automatically.
The for loop goes through each item in a list.Code Editor
Initializing editor...
💻 Output:
Click 'Run Code' to see output here...