Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
key, value = s.split(': ') solution in Clear category for YAML. Simple Dict by flpo
def yaml(a):
res = {}
for s in filter(None, a.splitlines()):
key, value = s.split(': ')
res[key] = int(value) if value.isnumeric() else value
return res
Nov. 10, 2019
Comments: