title: Creating a list of pairs python
body: <p>I've build the following code:</p>
  
  <pre><code>def pairs(num_list, n):
      list1 = []
      for num1 in num_list:
          for num2 in num_list:
              if num1 + num2 == n:
                  list1.append([num1, num2])
      return(list1)
  
  print(pairs([2,3,4,5],7))
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>[[2, 5], [3, 4], [4, 3], [5, 2]]
  </code></pre>
  
  <p><strong>BUT I only need NON REPETITIVE PAIRS TO SHOW</strong> 
  for ex. [[2, 5], [3, 4]] (doesn't matter which pair)</p>
  
  <p>I figured that I need to go through the numbers more efficiently like so:
  the first loop goes through 2. second loop compares it to 3,4,5 (without 2)
  then the first loop goes through 3. second loop goes through 4,5 (without 2 or 3) and so on. How can I actually do this with a code?</p>