回答編集履歴

1

replace文の間違いを修正

2020/05/15 04:57

投稿

tachikoma
tachikoma

スコア3601

answer CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```Python
4
4
  a = "[{'test': 'AND', 'children': [{'test3': 'value', 'test2': [12345678]}]}]"
5
- b = a.replace('"', "'") #
5
+ b = a.replace("'", '"') #
6
6
  d = json.loads(b)
7
7
  print(b[0][test])
8
8
  ...