Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
The for loop
The while loop
Nested loops
13. Nested for loops – introduction
break and continue


Good job. Remember when we learned about nested if statements? Loops can be nested, too! Take a look:

for i in range (1, 11):
  for j in range (1, 11):
    print(i, 'x', j, '=', i*j)

This short code will print a multiplication table from 1*1 until 10*10. Let's see that in action.


Run the template code and observe what happens.

You can see the multiplication results for all combinations from 1*1 until 10*10.