I have a tuple:
Tuple = (1, 2, 3)
"to aply str.format in the Tuple" def str_sume(Tuple): return '{} + {} = {}'.format(*Tuple)
I have two lists: L1 = [1, 2, 5] L2 = [5, 6, 8]
"to sum L1 and L2" def Sum(L1, L2): return list(map(lambda x, y: x + y, L1, L2))
SUM = Sum(L1, L2)
table = zip(L1, L2, SUM)
"to create a list of various tuples in wich all them have the str.format" def TABLE(table): return list(map(lambda triplet: str_sum(triplet), table))
TABLE(table) [ ]
The output I was waiting was: [('1 + 5 = 6'), ('2 + 6 = 8'), ('5 + 8 = 13')]
I don't understand was the output was an empty list I will appreciate somebody explain me way and tell me how to proceed to solve the problem. Thanks