So…you´re into this?

--Originally published at 101 For Tec

Nested loops ¿what are they? A nested loop is a loop within a loop, an inner loop within the body of an outer one. Is possible to realize this with all the different types of loops, with for´s, here is the basic structure:
nested_for_syntax

also with while’s

nested_while_syntax

with if else, and also combining them.

Here is one example of what you can do with nested loops:

nested.PNG

References:

https://www.tutorialspoint.com/python3/python_nested_loops.htm

http://tldp.org/LDP/abs/html/nestedloops.html