简体   繁体   中英

Load Yaml file in Python without converting to dict

I need to store the content of a yaml file to a variable as it is(without converting to dictionary) or after storing it as dictionary is there any way to bring back to yaml format without storing it inside the file. I tried with yaml.load(file) which returns the object in dictionary. Is there any way to achieve?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM