Can anyone explain loops in python to me please? | Sololearn: Learn to code for FREE!
+ 1

Can anyone explain loops in python to me please?

5th Feb 2019, 6:22 AM
John Annan
John Annan - avatar
3 Answers
0
There are 2 types of loops: While & For While loops arr used to repeat it's codeblock until it's condition gets false. For loop are used to iterate through each item in an iterator, Such as list- or range object. Both loops have another way to exit: break, you can place a break in a loop's code block and when ever it get's executed it breaks the loop.
5th Feb 2019, 6:44 AM
Seb TheS
Seb TheS - avatar
0
Sorry I mean thanks
13th Feb 2019, 8:18 AM
John Annan
John Annan - avatar
- 1
Thanls
13th Feb 2019, 8:18 AM
John Annan
John Annan - avatar