我有一个字符串,里面有一堆奇怪的东西,我想把它分解成一个列表:
"44":{"1":4.6,"0":1.53,"2":7.2},"53":{"1":4.2,"0":1.4,"2":6.75},"121":{"1":3.2,"0":1.6,"2":6}
理想情况下,我想:
"44":{"1":4.6,"0":1.53,"2":7.2}
"53":{"1":4.2,"0":1.4,"2":6.75}
"121":{"1":3.2,"0":1.6,"2":6}
但我会满足于在每个 } 处拆分。
mystring.split('}')
由于某种原因,似乎将我的字符串拆分为每个字符一个元素的列表。不知道我做错了什么。帮助!