Different YAML array representations
I'm writing a file type converter using Python and PyYAML for a project where I am translating to and from YAML files multiple times. These file are then used by a separate service that I have no control over, so I need to translate back the YAML the same as I originally got it. My original file has sections of the following: key: - value1 - value2 - value3 Which evaluates to {key: [value1,value2,value3]} using yaml.load() . When I translate this back to YAML my new file reads like this: key: [value1,value2,value3] My question is whether these two forms are equivalent as far as the various