Created
December 22, 2021 10:42
-
-
Save atemate/fb47844c653e110291e87e47ceb49516 to your computer and use it in GitHub Desktop.
Read '---' delimited yaml file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !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