• itertools
  • nested
  • for-loop

When you have multiple for loops, one nested in another, or you need a dynamic number of nested loops, use itertools.product().