- 1
I can't understand
Loop defination or How it works? Can someone tell. Me I will be so thankful to Him
3 odpowiedzi
+ 1
Loops are used to execute statements multiple times.
Example:
for i in range(0,5):
print(i)
Explanation:
A loop is defined with the for or while keywords. The 'i' in this case will hold the value given by "range(0,5)"(this produces values from 0 till 5-1).
The loop will keep on going and printing i as long as "range..." still has values to give.
It is all explained in the python tutorial.
0
Thank you