nested_split#

nested_split(text: str, max_depth=None) list#

Splits a string into a list of lists. Example: “a,(b,c,(d,e))” -> [‘a’, [‘b’, ‘c’, [‘d’, ‘e’]]] :param text: string list :param max_depth: :return: list of lists