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 takimoto0223
def yaml(a):
s=a.split('\n')
d={}
for i in range(len(s)):
if s[i]=='':
pass
else:
S=s[i].split(': ')
d[S[0]]=S[1] if not S[1].isnumeric() else int(S[1])
return d
March 25, 2021