```python l = range(0, 10) for i in l: yaml.dump(['0' + str(i)]) ``` Result: ``` ... "- '00'\n" "- '01'\n" "- '02'\n" "- '03'\n" "- '04'\n" "- '05'\n" "- '06'\n" "- '07'\n" '- 08\n' '- 09\n' ``` Is this supposed to be so? I'm on python 3.8, pyyaml v. 5.3.1