I have a tuple of tuples from a MySQL query like this:
T1 = ((\'13\', \'17\', \'18\', \'21\', \'32\'), (\'07\', \'11\', \'13\', \'14\', \'28\'),
You can do something like this:
T1 = (('13', '17', '18', '21', '32'), ('07', '11', '13', '14', '28'), ('01', '05', '06', '08', '15', '16')) new_list = list(list(int(a) for a in b if a.isdigit()) for b in T1) print(new_list)