Skip to content
Advertisement

Cartesian product of two lists in python [duplicate]

Cartesian product of two lists in python

JavaScript

Expected Output:

JavaScript

Advertisement

Answer

Do a list comprehension, iterate over both the lists and add the strings, like

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement