I have a list which has strings of length 1 up to n:
a = ['a','aq','thw','z']
I'm trying to obtain a flat list with only length 1 elements, expanding those the length of which is greater than 1. My current solution is:
l = []
for i in a:
l = l + list(i)
print(l)
['a', 'a', 'q', 't', 'h', 'w', 'z']
Is there a more straight forward way of doing this avoiding a for loop?
My impression is that there might not be, however I'm curious where as to know if there is some other more efficient perhaps built-in method to accomplish this. Thanks in advance.