Skip to content

Instantly share code, notes, and snippets.

@atemate
Created December 22, 2021 10:42
Show Gist options
  • Save atemate/fb47844c653e110291e87e47ceb49516 to your computer and use it in GitHub Desktop.
Save atemate/fb47844c653e110291e87e47ceb49516 to your computer and use it in GitHub Desktop.
Read '---' delimited yaml file
# !pip install pyyaml
import yaml
path = '/tmp/jobs.txt'
with open(path) as f:
data = list(yaml.load_all(f, Loader=yaml.FullLoader))
print(len(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment