title: How to avoid comparing duplicate strings in a list
body: <p>I have a list of a hundred or so strings and each string is compared with one another in 2 for loops, here is a very basic overview of code:</p>
  
  <pre><code>string_list = ["PII", "AZO", "CVCO", "MOD"]
  
  for x in string_list:
      for y in string_list:
          if x != y:
              print (x, y)
  </code></pre>
  
  <p>Which prints:</p>
  
  <pre><code>PII AZO
  PII CVCO
  PII MOD
  AZO PII
  AZO CVCO
  AZO MOD
  CVCO PII
  CVCO AZO
  CVCO MOD
  MOD PII
  MOD AZO
  MOD CVCO
  </code></pre>
  
  <p>As you can see, a lot of the strings are compared twice (PII - AZO and AZO - PII, etc.)</p>
  
  <p>I've been trying to figure out how to avoid this problem using 2 count variables but I am scratching my head, there must be an easier/pythonic way of doing this so there are no overlapping string comparisons, does anyone know how to accomplish this?</p>
  
  <p>Python 3, thanks.</p>
  
  <p>EDIT:</p>
  
  <p>Expected result:</p>
  
  <pre><code>PII AZO
  PII CVCO
  PII MOD
  AZO CVCO
  AZO MOD
  CVCO MOD
  </code></pre>