import yaml
def test_yaml():
    f = open('C:\hogwarts\Scripts\hogwarts-api\demo\yaml_data.yml')
    print(yaml.load(f))  

# 改进:
import yaml
def test_yaml():
f = open('C:\hogwarts\Scripts\hogwarts-api\demo\yaml_data.yml','rb')
print(yaml.load(f))

相关文章:

  • 2022-01-16
  • 2021-10-25
  • 2021-06-14
  • 2021-12-15
  • 2021-04-19
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2021-10-26
  • 2021-07-22
  • 2021-09-21
相关资源
相似解决方案