I have a list of tuples:
tup = [('a', '10', 0xA), ('b', '9', 0x9)]
I am trying to change the values of the 3rd element in it
My attempt:
for i, elements in enumerate(tup):
elements = list(elements)
elements[2] = 0x99
When I check the contents of the tuple, it does not update with new my value.
Input: [i for i in tup]
Output: [('a', '10', 10), ('b', '9', 9)]
Clearly a significant misunderstanding of how these data structures work on my part.
Any help appreciated.
Cheers