title: TypeError: list indices must be integers, not unicode - django python
body: <pre><code>comment_json = urllib2.urlopen("https://graph.facebook.com/comments/?ids=http://www.places4two.de/location/"+locname+"/"+str(lid)+"/")
  comment_dict = json.loads(comment_json.read())
  </code></pre>
  
  <p>if I print <code>comment_dict</code>, i am getting dict in this form this: </p>
  
  <pre><code>{u'http://www.places4two.de/location/date-in-caroussel/2406/': 
  {u'comments': 
     {u'paging': 
       {u'cursors': {u'after': u'MQ==', u'before': u'Mg=='}}, 
       u'data': [
          {u'from': {u'name': u'John Purlore', u'id': u'100005454794537'}, 
          u'like_count': 0, 
          u'can_remove': False, 
          u'created_time': u'2013-10-30T09:02:51+0000', 
          u'message': u'Essen ist richtig lecker\n', 
          u'id': u'573597026010502_13875759', 
          u'user_likes': False},
                 ]
       }
      }
     }
  </code></pre>
  
  <p>and now I just want to check if <code>data</code> has some value or not: </p>
  
  <pre><code>if comment_dict['http://www.places4two.de/location/'+locname+'/'+str(lid)+'/']['comments']['data']:
  </code></pre>
  
  <p>but in this line, i am getting the error: </p>
  
  <pre><code>TypeError: list indices must be integers, not unicode
  </code></pre>
  
  <p>what am i doing wrong? <code>locname</code> is locationname and <code>str(lid)</code> is string version of location_id - so they are variables.</p>
  
  <p>isnot it because of <code>str()</code>? </p>