Wednesday, October 23, 2019

WHILE loop in python

EXAMPLE 1:
while 1:
    print("Hello")

output:
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
......

EXAMPLE 2:

x=0
while 1:
    print(x)

    x+=1

output:
1
2
3
4
5
.....

python class topic video