Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
split solution in Clear category for YAML. Simple Dict by Olpag
def yaml(a):
t = [i.strip() for i in a.split('\n') if i]
d = {}
for elem in t:
key, val = (i.strip() for i in elem.split(':'))
d[key] = int(val) if val.isdecimal() else val
return d
Nov. 14, 2019
Comments: