title: Generate n choose 2 combinations in python on very large data sets
body: <p>I need to create n choose 2 combinations and am currently using pythons itertools.combinations module. </p>
  
  <p>For a single list of 30,000 strings, creating the combinations runs for hours and uses many gigs of ram, ie </p>
  
  <pre><code>list(itertools.combinations(longlist,2))
  </code></pre>
  
  <p>is there a method of generating combinations that is potentially better optimized for large objects in memory? Alternately is there a way of using numpy to speed up the process? </p>