Python while
Zur Navigation springen
Zur Suche springen
Die while Schleife wird solange durchlaufen solange die Bedingung erfüllt ist.
#!/usr/bin/python
import sys
i = 1
x = sys.argv[1]
while i <= int(x):
print(i)
i = i + 1