Files
pythonkurs/walross/loop.py
2024-06-19 12:03:53 +02:00

11 lines
137 B
Python

# Ohne Walross-Operator
n = 0
while n < 10:
n += 1
print(n)
# Mit Walross-Operator
n = 0
while (n := n + 1) <= 10:
print(n)