I want to use a triple list comprehension in python to to make a flat list.
mynested = [[['1229'], [['2020-11'], ['2020-1'], ['2020']]], [['1230'], [['2020-12'],['2020-2'], ['2020']]]]
I would like it to work like this.
short=[]
for a in mynested:
for b in a:
for c in b:
short.append(''.join(c))
for shrt in short:
print(shrt)
Outcome:
1229
2020-11
2020-1
2020
1230
2020-12
2020-2
2020
But how do I get this outcome with a list comprehension?