title: Combine two "for" loops while iterating on first one
body: <p>i have seen some answers with itertools like :</p>
  <pre><code>for x, y in itertools.product([1,2,3], [1,2,3]):
      print x, y
  </code></pre>
  <p>but as i have to iterate on attributes from objects from the first list like that :</p>
  <pre><code>for obj, param in itertools.product(object_list, obj):
      print(param)
  </code></pre>
  <p>This throw an error (obj referenced before assignment), otherwise i would not be here obviously, but is there a way to do this that doesn't imply two &quot;for&quot; loops ?</p>
  <p>like</p>
  <pre><code>for obj in object_list:
      for param in obj:
          print(param)
  </code></pre>
  <p>Thank you for any answer</p>