title: Is it the pythonic way to use multiple comprehensions in a single return statement?
body: <p>I am starting with the book "Data Science from Scratch" which is an awesome hands-on text on data science with Python. </p>
  
  <p>One of the examples in the book contains a PERL like one liner.</p>
  
  <pre><code>def foaf_ids_bad(user):
      return [foaf["id"]
              for friend in user["friends"]
              for foaf in friend["friends"]]
  </code></pre>
  
  <p>I would like to understand whether re-writing the above code as follows is considered as python convention? or the above one is more pythonic way</p>
  
  <pre><code>def friends_of_friend_ids_bad(user):
      foaf_list = list()
      for friend in user['friends']:
          for foaf in friend['friends']:
              foaf_list.append(foaf['id'])
      return foaf_list
  </code></pre>