In Python, I have the following string:
string_example = '11 31 (31 573) ((11 573)<(31 573 [1 0 0])<(11 31))'
I would like to extract a list with sublists by splitting the string using spaces and “()” as delimiters, without splitting the sub-parentheses. The desired list is:
list_split=['11', '31', '(31 573)', '((11 573)<(31 573 [1 0 0])<(11 31))']