Loop Python

 # for i in range(1,10): , 10 is not include

# range(start , stop , step)
# if start value is not mention then it's value is 0

# for i in range(11):
#     print(i)
# 0
# 1
# 2
# 3
# 4
# 5
# 6
# 7
# 8
# 9
# 10

# list=[10,20,30,40,50,60,70]
# for i in list:
#     print(i)

# 10
# 20
# 30
# 40
# 50
# 60
# 70

# while loop
# i=1
# while i<20:
#     print(i)
#     i+=1

Comments

Popular posts from this blog

Introduction of java Programming language.

Stack data structure.