I have a tuple a = (('1414', 'A'), ('1416', 'B'))
and I need to obtain the result as result = ((1414, 'A'), (1416, 'B'))
.
I tried tuple([map(int, x[0]) for x in a])
based on How to convert strings into integers in Python? and I get the result as ([1414], [1416])
. How would I maintain the result as a tuple with the changed value instead of making it as a list?