Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
split('\n') solution in Clear category for YAML. Simple Dict by Ves
def yaml(a):
obj = {}
list_a = a.split('\n')
for i in list_a:
if len(i) > 0:
s = i.split(': ')
if s[1].isdigit():
s[1] = int(s[1])
obj[s[0]] = s[1]
return obj
May 18, 2020