PYTHON Reference: Loops
Quick reference for Loops.
PYTHON Reference — Loops
Quick summary of Loops with syntax and example.
Syntax
for x in items:
Example
nums = [1,2,3,4]
even = [n for n in nums if n % 2 == 0]
print(even)
Quick reference for Loops.
Quick summary of Loops with syntax and example.
for x in items:
nums = [1,2,3,4]
even = [n for n in nums if n % 2 == 0]
print(even)