title: Print set() item fill with python generator
body: <p>I have a generator:</p>
  
  <pre><code>foundUnique = set()
  def unique_items(myList, index, clearFlag): 
      for item in myList:
          if clearFlag is True:
              foundUnique.clear()
              clearFlag = False
          if item[index] not in foundUnique:
              yield item
              foundUnique.add(item[index])
  </code></pre>
  
  <p>And I am using this `unique_items to get a unique list:</p>
  
  <pre><code>senderDupSend = unique_items(ip, 4, True)
  </code></pre>
  
  <p>Now I want my set to be reachable (I can print its element or do some changes on specific element .....) but when I write:</p>
  
  <pre><code>for item in foundUnique:
      print item
  </code></pre>
  
  <p>It prints nothing!</p>
  
  <p>But if I write:</p>
  
  <pre><code>for item in senderDupSend:
      print item
  for item in foundUnique:
      print item
  </code></pre>
  
  <p>It prints all foundUnique items.</p>
  
  <p>Please tell what did I do wrong? How can I solve this problem?</p>