How to convert unicode array to string in Python
<p>I am very new with Python and I am trying to print a single object from a unicode array that I retrieved from my server. My array look like this when I print the results:</p>

<pre><code>{u'results': [{u'playerName': u'Sean Plott', u'score': u'12'}]
</code></pre>

<p>I would like to print the result in <code>playerName</code> as a string only. Thanks in advance.</p>

<p>You should spend some time looking up dictionaries and lists in python. You currently have a dictionary with a list in it, and a dictionary inside of that list.</p>

<p>Here's the official reference guide on Python data structures:</p>

<p><a href="https://docs.python.org/3/tutorial/datastructures.html" rel="nofollow">https://docs.python.org/3/tutorial/datastructures.html</a></p>

<p>That being said, here's an example:</p>

<pre><code>&gt;&gt;&gt; d = {u'results': [{u'playerName': u'Sean Plott', u'score': u'12'}]}
&gt;&gt;&gt; d["results"]
[{'score': '12', 'playerName': 'Sean Plott'}]
&gt;&gt;&gt; d["results"][0]["playerName"]
'Sean Plott'
</code></pre>

python arrays string unicode