what is the best way to unpack a FIX message into a python dictionary?
<p>string looks like this:</p>

<pre><code>input = 'key1=val1\001key2=val2\001key3=val3\001key4=val4'
</code></pre>

<p>where \001 is the separator  </p>

<pre><code>message = {}
</code></pre>

<p>uh... now what? I know I can do something like</p>

<pre><code>my_list = imput.split('\001')
my_dict = {}

for pair in my_list:
    tup = pair.split('=')
    my_dict[tup[0]] = tup[1]
</code></pre>

<p>This works but it seems really ugly. There must be a better way.</p>
