Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python read yaml

# read_categories.py file

import yaml

with open(r'E:datacategories.yaml') as file:
    documents = yaml.full_load(file)

    for item, doc in documents.items():
        print(item, ":", doc)
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #python #read #yaml
ADD COMMENT
Topic
Name
9+1 =