Important Notice:

Course Content
Conditional and Iterative Statements (Chapter-5) M3-R5.1
About Lesson
Nested For Loops:-

          For Loop के अंदर एक और For Loop use करना ही Nested For Loop कहलाता हैं। Python में Nested For Loop कुछ इस तरह से use करते है।

Example:

for i in range(1, 4):   

         for j in range(i):        

                print(i, end=”)   

         print()

Output

1

2   2

3   3    3 

 

Nested For Loops:-

          Using another For Loop inside a For Loop is called Nested For Loop. Nested For Loop is used like this in Python.

Example:

for i in range(1, 4):   

         for j in range(i):        

                print(i, end=”)   

         print()

Output

1

2   2

3   3    3 

 

 

 

error: Content is protected !!