将带有嵌套括号的字符串转换为嵌套列表python

将带有嵌套括号的字符串转换为嵌套列表python,python,list,parsing,nested,Python,List,Parsing,Nested,还有其他关于堆栈溢出的问题,例如 但它们都以((abc)de(fg))的格式引用列表。进入表格:[['a','b','c']'d','e'['f','g',]]]我有一个表格列表: ((wordOneWord2)OtherWord(FinalWord))) [['w','o','r','d','O','n','e','W','o','r','d','2']'O','t','h','e','r','W','o','r','d',['F','i','n','a','l','W','o','r','

还有其他关于堆栈溢出的问题,例如

但它们都以
((abc)de(fg))
的格式引用列表。进入表格:
[['a','b','c']'d','e'['f','g',]]]
我有一个表格列表:

((wordOneWord2)OtherWord(FinalWord)))
[['w','o','r','d','O','n','e','W','o','r','d','2']'O','t','h','e','r','W','o','r','d',['F','i','n','a','l','W','o','r','d']]]
通过使用我从其他问题中学到的方法,嵌套列表的形式如下:

((wordOneWord2)OtherWord(FinalWord)))
[['w','o','r','d','O','n','e','W','o','r','d','2']'O','t','h','e','r','W','o','r','d',['F','i','n','a','l','W','o','r','d']]]
而不是想要的

[['wordOneWord2'], 'OtherWord', ['FinalWord']]
我可以通过逐个字母解析列表,然后将每个列表中的项目重新连接在一起来实现所需的结果,但这需要比我认为必要的更多的代码,有没有更快的方法呢?

基于此: