How do I format a YAML document like this so that PyYAML can parse it properly?
Data: Some data, here and a special character like \':\'
Another line o
For multi-line scalars, you can use blocks. The character |
denotes the start of a block. Use:
Data: |
Some data, here and a special character like ':'
Another line of data on a separate line
If the extra newline that NullUserException's solutions is adding is a problem you should be using:
Data: |-
Some data, here and a special character like ':'
Another line of data on a separate line