白白学习笔记【yaml】:解决中文乱码问题

不解决睡不着 :skull::skull::skull:

import yaml

with open("data.yml", "r", encoding='utf-8') as f:
    data1 = yaml.safe_load(f)
    print(data1)

2 个赞