1.安装:pip install pyyaml
2.使用:
yaml.safe_dump(dict_data, fss, indent=2, sort_keys=False, allow_unicode=True)
yaml.safe_load(open(file, 'r', encoding="utf-8))