Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
if colon: result[key] = value solution in Clear category for YAML. Simple Dict by veky
def yaml(markup):
result = {}
for line in markup.splitlines():
key, colon, value = line.partition(': ')
if colon:
if value.isdigit(): value = int(value)
result[key] = value
return result
June 25, 2019