目录
yaml官方文档:YAML Ain’t Markup Language (YAML™) revision 1.2.2
pyyaml官方文档:https://pyyaml.org/wiki/PyYAMLDocumentation
1. yaml基本示例
- 列表 (Sequence of Scalars),用 - 值 来表示数组中的每个元素,其中字符串不用单独加引号来表示
- Apple
- Banana
- orange
- Map集合-值是标量 (Mapping Scalars to Scalars):用冒号和空格来表示键值对
hr: 65
avg: 0.278
rbi: 147
- Map集合-值是列表 (Mapping Scalars to Sequences),#表示注释
american:
-