How can you convert a list of poorly formed data pairs into a dict?
<p>I'd like to take a string containing tuples that are not well separated and convert them into a dictionary.</p>

<p>s = "banana 4 apple 2 orange 4"</p>

<p>d = {'banana':'4', 'apple':'2', 'orange':'4'}</p>

<p>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?</p>
