current position:Home>Python writing yaml file

Python writing yaml file

2022-06-24 06:57:25CSDN Q & A

Raw data


expect yaml Write format


actual yaml Write the result


Write method used
with open('locationtest.yaml','w',encoding='utf-8') as f1:
yaml.dump(ab, f1, Dumper=yaml.RoundTripDumper,default_flow_style=False,allow_unicode=True, indent=4)
How can I get the yaml Format

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.

Random recommended