test.py 375 B

1234567891011121314151617
  1. """
  2. # File : test.py
  3. # Time :2024-06-23 11:59
  4. # Author :FEANGYANG
  5. # version :python 3.7
  6. # Contact :1071082183@qq.com
  7. # Description:
  8. """
  9. import yaml
  10. # 假设你的YAML内容存储在一个名为 data.yaml 的文件中
  11. with open('../test.yaml', 'r') as file:
  12. data = yaml.safe_load(file)
  13. # 打印读取的数据
  14. print(data)