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))
2023-11-05 08:47:16
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))