Read YAML



examples/yaml/data.yaml
# A comment

Course:
  Language:
    Name: Ladino
    IETF BCP 47: lad
  For speakers of:
    Name: English
    IETF BCP 47: en
  Special characters: []

Modules:
  - basic/
  - words/
  - verbs/
  - grammar/
  - names/
  - sentences/

examples/yaml/read_yaml.py
import yaml

filename = "data.yaml"

with open(filename) as fh:
    data = yaml.load(fh, Loader=yaml.Loader)

print(data)