I have been trying to split and combine the following list without using any libraries like pandas.
Input list:
aa = [(('a', 'b', 'c'), 1), (('x', 'y', 'z'), 5), (('xa', 'ya', 'za'), 25)]
Expected output:
[('a', 'b', 'c', 1), ('x', 'y', 'z', 5), ('xa', 'ya', 'za', 25)]
I have already tried:
aa = [inner
for outer in aa
for inner in outer]
But it gave me:
[('a', 'b', 'c'), 1, ('x', 'y', 'z'), 5, ('xa', 'ya', 'za'), 25]
Which is close but not what I am looking for.