I have came across this problem a few times and can\'t seem to figure out a simple solution. Say I have a string
string = \"a=0 b=1 c=3\"
I wan
I would do this:
def kv(e): return (e[0], int(e[1])) d = dict([kv(e.split("=")) for e in string.split(" ")])