Nested loops

0
38

जब loop के अन्दर loop होता है वो हमारा nested loop कहलाता  है। जिसमें एक inner loop होता है जोकि outer loop की body होता है जब एक बार Outer loop चलेगा जब ही inner loop execute होगा और यही process बार-बार चलेगा जब तक कि वह finish नहीं हो जाता और कहें कि condition false नहीं हो जाती।

 Syntax using for loop:
                    for variable_name in sequence:
                       for variable_name in sequence:
                           statements(s)
                       statements(s)
 Syntax using while loop:
                    while expression:
                        while expression:
                           statement(s)
                        statement(s)
              Example:
                      i = 1
                      j =  
                      while i < 5:
                          while j < 8:
                           print(i, ",", j)
                           j = j + 1
                           i = i + 1
              Output:
                     1 ,          
                     2 , 5
                     3 , 6
                     4 , 7

nested loop को पढ़ने के बाद अन्य प्रकार के looping statements नीचे दिये हुये हैं।

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

Nested loops nested loops in hindi nested loop in python in hindi nested loop in python nested loop in python estudyhelper nested loop in python estudyhelper.xyz nested loop in python in hindi estudyhelper nested loop in python in hindi estudyhelper.xyz while loop in python while loop in python in hindi for loop in python for loop in python in hindi loop control statements loop control statements in python loop control statements in python in hindi multiple loops in python nested loops in python examples multilple loops in python in hindi nesting a loop in python nesting a loop in python in hindi examples of nested loops in python examples of nested loops in python in hindi syntax of nested loop in python syntax of nested loop in python in hindi creating nested loops in python creating nested loops in python in hindi how to do nested loops in pythonhow to do nested loops in python in hindi python nested loop python nested loop in hindi

LEAVE A REPLY

Please enter your comment!
Please enter your name here