📖 INDEX
LOADING ENGINE...
for Loop
PYTHON REFERENCE // for-loop
Used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string)
Syntax
for x in ['apple', 'banana']:
print(x)Examples
Example 01Basic Usage
for x in ['apple', 'banana']:
print(x)Best Practices
- Consult official Python documentation for advanced usage.
- Ensure proper indentation and Pythonic style (PEP 8).