Question: Write a Python program/script to replace last value of tuples in a list Sample data: [(), (), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')] Expected
Write a Python program/script to replace last value of tuples in a list
Sample data: [(), (), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')]
Expected output: [('',), ('a', 'b'), ('a', 'b', 'c'), 'd']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
