Skip to content

Instantly share code, notes, and snippets.

@ram1123
Last active July 4, 2018 11:10
Show Gist options
  • Save ram1123/e454909078956e891d474717a8c3f88e to your computer and use it in GitHub Desktop.
Save ram1123/e454909078956e891d474717a8c3f88e to your computer and use it in GitHub Desktop.
How to read yaml file

How To Read YAML Files

import yaml

file = open("yamlfile.yml","r")
ymload = yaml.load(file)
file.close()

for sections in ymload:
  print sections
  print ymload[sections]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment