catlove007's picture
Upload 5 files
9643499
raw
history blame contribute delete
389 Bytes
import re
import json
if __name__ == '__main__':
s = """
```json
[
"共建一带一路",
"中欧班列",
"2021年",
"2022年8月18日",
"国际公共产品",
"实打实、沉甸甸的成就",
"组织编写",
"正式发布"
]
```
"""
print(s)
a = re.findall(r'```json[\s\S]*```', s)[0]
print(a)
b = json.loads(a[7:-3])
print(b)