[str1, str2, [str21, str22, [str221], str23], str3, str4, [str41, str42], str5]
и т.д.[str1, str2, str21, str22, str221, str23, str3, str4, str41, str42, str5]
def flatten(l):
for el in l:
if isinstance(el, collections.Iterable) and not isinstance(el, basestring):
for sub in flatten(el):
yield sub
else:
yield el