Program - Compute the product of every pair of numbers from two lists


Topic: Program - Compute the product of every pair of numbers from two lists

Solution

list1 = [1, 2, 3]
list2 = [5, 6, 7] 
final = [a*b for a in list1 for b in list2]
print(f"Product of every pair of numbers from two lists:{final}")



List all Python Programs