Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for YAML. Simple Dict by saad452
def yaml(a):
b = dict([l.split(": ") for l in sorted(a.splitlines()) if l])
for k,v in b.items():
if v.isnumeric():
b[k] = int(v)
return b
Nov. 17, 2025
Comments: