I'd like to take a string containing tuples that are not well separated and convert them into a dictionary.
s = "banana 4 apple 2 orange 4"
d = {'banana':'4', 'apple':'2', 'orange':'4'}
I'm running into a problem because the space is used to separate the values as well as the pairs. What's the right trick?