I have a recursive tuple of strings that looks like this:
('text', ('othertext', ('moretext', ('yetmoretext'))))
(it's actually a tuple of tuples of strings - it's constructed recursively)
And I'd like to flatten it into a list of strings, whereby foo[1] would contain "text", foo[2] "othertext" and so forth.
How do I do this in Python?
The duplicate is about a 2D list of lists, but here I'm dealing with a recursive tuple.