CBSE BOARD XII, asked by nancyjaat42006, 6 months ago

python catesian product​

Answers

Answered by tannigang
1

Answer:

Python | Construct Cartesian Product Tuple list

Sometimes, while working with data, we need to create data as all possible pairs of containers. This type of application comes from web development domain. Let’s discuss certain ways in which this task can be performed.

Method #1 : Using list comprehension

This is one-liner way to perform this particular task. In this, we just shorten the task of loop in one line to generate all possible pairs of tuple with list elements.

Similar questions