Skip to content

Instantly share code, notes, and snippets.

@benwei benwei/yaml_test1.py
Last active Mar 14, 2019

Embed
What would you like to do?
test to load yaml syntax by pyyaml library
import yaml
document = """
a: 1
b:
c: 3
d: 4
"""
r_load=yaml.dump(yaml.load(document))
print(r_load)
r_dump=yaml.dump({'name': "The Cloak 'Colluin'",
'depth': 5, 'rarity': 45,
'weight': 10,
'cost': 50000,
'flags': ['INT', 'WIS', 'SPEED', 'STEALTH']})
print(r_dump)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.