title: avoid the double counting in for loop
body: <p>This is my situation, I have 16 tuples inside a list. I need to match one of the element of tuple and iterate the list. it should return me the unique set but its returning me double or triple counts. Any list comprehension advise in this?</p>
  
  <pre><code>lst= [(12, 'a'), (15, 'a'), (17, 'a'), (12, 'a'), (15, 'a'), (23, 'b'), (12, 'b'), (18, 'b'), (12, 'b'), (12, 'b'), (15, 'a'), (12, 'a'), (15, 'a'), (15, 'a'), (24, 'c'), (12, 'c')]
  </code></pre>
  
  <p>I need to access this list from above, </p>
  
  <pre><code>for i in  employerEmployeeEdges:
  ""iterate over the list of tuples""
      for j in employerEmployeeEdges[1:]:
  """iterate over to the next tuple to check if that matches
          if i[1]==j[1]:
              print(i[1], j[1))
  </code></pre>
  
  <p>I know I have partially accomplished to match the items but how would I prevent it double counting? </p>