- 2

How to do a loop easily in python?

I want examples

12th May 2017, 9:08 AM
lorshan
lorshan - avatar
3 Respostas
+ 6
#here is a loop that counts until it reaches a number a=0 while a != 42: a+=1 print(a) #and if you want a infinite loop: while True: print("hoi")
12th May 2017, 9:21 AM
Ahri Fox
Ahri Fox - avatar
+ 2
for i in range(10): print(i)
12th May 2017, 10:10 AM
LordHill
LordHill - avatar
+ 1
thanks
12th May 2017, 9:21 AM
lorshan
lorshan - avatar