How can I create a nested loop in Python?



In the context of this code challenge, how can we create a nested loop in Python?


In Python, and almost every other programming language, you can create a nested loop by placing a loop within the block of another loop.

When nesting loops, keep in mind that on each iteration of the outer loop, the inner loop will completely run.


for first in first_names:
  # On each iteration of this outer loop
  # the inner loop will run to completion

  for last in last_names:
    print(first + " " + last)