I have:
mylist = [(['a', 'b'], [1, 2]), (['c', 'd'], [3])]
I need one list with the letters and one with the numbers, like this:
(['a', 'b', 'c', 'd'], [1, 2, 3])
I have made some efforts, but I could just get one list with the letters, not both:
answer = [item for sublist in mylist for item in sublist[0]]
#returns ['a', 'b', 'c', 'd']
answer = [[item for sublist in mylist for item in sublist[i]] for i in range(2)]