I have a list which has tuple element. I need to modify the tuple element.
list1 = [1, (2, 'A'), 'B']
I need to modify 'A' to 'Z'
Thanks in Advance!
My solution is:
list1[1] = list(list1[1])
list1[1][1] = 'Z'
list1[1] = tuple(list1[1])
Is there any other feasible solution for this?