Question: By using a basic nested for loop, and not using list comprehension, create a list called ans7 of all possible lists, each of which contains
By using a basic nested for loop, and not using list comprehension, create a list called ans7 of all possible lists, each of which contains a number from l1, a number from l2, and the product of the two numbers.
l1 = list(range(5))
l2 = list(reversed(l1))
l1, l2
([0, 1, 2, 3, 4], [4, 3, 2, 1, 0])
Step by Step Solution
There are 3 Steps involved in it
Program l1 listrange5 01234 l2 listreversedl1 43210 ans7 for ... View full answer
Get step-by-step solutions from verified subject matter experts
