MCPcopy Create free account
hub / github.com/geekcomputers/Python / cartesian_product

Function cartesian_product

cartesian_product.py:7–11  ·  view source on GitHub ↗

Cartesian Product of Two Lists.

(list1, list2)

Source from the content-addressed store, hash-verified

5
6# Cartesian Product of Two Lists
7def cartesian_product(list1, list2):
8 """Cartesian Product of Two Lists."""
9 for _i in list1:
10 for _j in list2:
11 print((_i, _j), end=" ")
12
13
14# Main

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected