Skip to main content
2 of 2
added 87 characters in body
Chas Brown
  • 9.8k
  • 1
  • 13
  • 39

Python 2, 60 59 bytes

f=lambda A,*x:[[v]+u for v in A for u in x and f(*x)or[[]]]

Try it online!

1 byte thx to ovs.

Look Ma! No itertools!

Chas Brown
  • 9.8k
  • 1
  • 13
  • 39