How to parse Python set-inside-list structure into text?
<p>I have the following strange format I am trying to parse. </p>

<p>The data structure I am trying to parse is a "set" of key-value pairs in a list:</p>

<pre><code>[{'key1:value1', 'key2:value2', 'key3:value3',...}] 
</code></pre>

<p>That's the only data I have, and it needs to be processed. I don't think this can be described as a Python data structure, but I need to parse this to become a string like </p>

<pre><code>'key1:value1, key2:value2, key3:value3'. 
</code></pre>

<p>Is this doable?</p>

<p>EDIT: Yes, it is <code>key:value</code>, not <code>key</code>:<code>value</code></p>

<p>Also, this is Python3.x</p>

<p>I would use itertools </p>

<pre><code>d = {'key1':'value1', 'key2':'value2', 'key3':'value3'}

for k, v in d.iteritems():
    print k + v + ',',
</code></pre>

python regex string python-3.x