0

What is a loop in python

16th Aug 2018, 10:54 AM
raja
2 Answers
+ 1
The Python for statement iterates over the members of a sequence in order, executing the block each time. Contrast the for statement with the ''while'' loop, used when a condition needs to be checked each iteration, or to repeat a block of code forever. While loop from 1 to infinity, therefore running forever.
16th Aug 2018, 3:56 PM
Maninder $ingh
Maninder $ingh - avatar