Write Python program to demonstrate working of Cummulative Records Product
Topic: Write Python program to demonstrate working of Cummulative Records Product
Solution
def prod(val) : res = 1 for ele in val: res *= ele return res test_list = [(2, 4), (6, 7), (5, 1), (6, 10), (8, 7)] print("The original list : " + str(test_list)) res = prod(int(j) for i in test_list for j in i) print("The Cummulative product of list is : " + str(res))
List all Python Programs