W
Wujek
Hi!
From list:['key1:val1', 'key2:val2']
I want dict:{'key2': 'val2', 'key1': 'val1'}
Is there any better (faster, simplier, prettier?) solution than this?.... spl=line.split(':')
.... d[spl[0]] = spl[1]
Regards.
From list:['key1:val1', 'key2:val2']
I want dict:{'key2': 'val2', 'key1': 'val1'}
Is there any better (faster, simplier, prettier?) solution than this?.... spl=line.split(':')
.... d[spl[0]] = spl[1]
Regards.