Convert nested dictionary values to single string
<p>How can I convert the below nested dictionary values to a single string ?</p>

<pre><code>data = {'people': {'first': {'fname': 'P1', 'lname': 'L1'}, 'second': { 'fname': 'P2', 'lname': 'L2'}}}
</code></pre>

<p>Output should be <code>P1 L1, P2 L2</code></p>

<p>Here is my current code: </p>

<pre><code>print ', '.join("%s %s" % (data['people'][person].get('fname'), data['people'][person].get('lname')) for person in data['people'])
</code></pre>

<p>Is this a efficient way for a larger set to items in people dict ? If not how to improve this  ?</p>