For this problem, the prefilled code will contain a list of tuples. Write a program to replace the last number of each tuple in the list with the given number (N).
1
Expert's answer
2021-08-22T07:16:27-0400
lst = [(10, 12, 43), (54, 0, 77), (3, 24, 81, 99), (19, 36)]
n = int(input())
lst = [el[0:-1] + (n,) for el in lst]
Comments
Leave a comment