guys. I\'m trying to find the most elegant solution to a problem and wondered if python has anything built-in for what I\'m trying to do.
What I\'m doing is this. I
Google brought me next solution:
def flatten(l): if isinstance(l,list): return sum(map(flatten,l)) else: return l