def flatten(lst):
    """flatten([["a","btr"],"b", [],["c",["d",["e"], []]]]) will return ['a', 'btr', 'b', 'c', 'd', 'e']"""
    def flatten_aux(item, accumulated):
        if type(item) != list:
            accumulated.append(item)
        else:
            for l in item:
                flatten_aux(l, accumulated)
    accumulated = []
    flatten_aux(lst,accumulated)
    return accumulated