What is loop:-
python में, loop block का एक ऐसा set होता है जो दिए गए statement को बार-बार repeat और execute करता है, loop किसी भी statement को तब तक execute करता है जब तक loop में दी गयी condition false ना हो जाये।
Loop के दो part होते हैं – पहला loop body और दूसरा control statement
Types of Loop:-
पाइथन मे तीन प्रकार के loops होते है।
- while loop
- for loop
- nested
Note:- do while loop is not there in Python
What is loop:-
In python, a loop is a set of blocks that repeat and execute a given statement repeatedly. A loop executes any statement until the condition given in the loop becomes false.
Loop has two parts – first loop body and second control statement.
Types of Loop:-
There are three types of loops in Python.
- while loop
- for loop
- nested
Note:- do while loop is not there in Python