title: ncr Combinations with pyspark nc3
body: <pre><code>random42 = sorted(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q','R','S','T','U','V','W','X','Y'])        
  </code></pre>
  
  <p>Need a ncr output to have the below three label combination in pyspark code</p>
  
  <p>['AAA', 'AAB', 'AAC', 'AAD', 'AAE', 'AAF', 'AAG', 'AAH', 'AAI', 'AAJ', 'AAK', 'AAL', 'AAM', 'AAN', 'AAO', 'AAP', 'AAQ', 'AAR', 'AAS','BAA', 'BAB', 'BAC', 'BAD', 'BAE', 'BAF', 'BAG', 'BAH', 'BAI', 'BAJ','BAK', 'BAL', 'BAM', 'BAN', 'BAO', 'BAP', 'BAQ', 'BAR', 'BAS', 'BAT', 'BAU', 'BAV'...'YYT', 'YYU', 'YYV', 'YYW', 'YYX', 'YYY']</p>
  
  <pre><code>&gt;&gt;&gt; rdd = sc.parallelize([1, 2])
  &gt;&gt;&gt; sorted(rdd.cartesian(rdd).collect())
  [(1, 1), (1, 2), (2, 1), (2, 2)]
  </code></pre>
  
  <p>I need a three letter combination like</p>
  
  <pre><code>&gt;&gt;&gt; rdd = sc.parallelize([1, 2, 3, 4, 5])
  &gt;&gt;&gt; sorted(rdd.cartesian(rdd).collect())
  [(1, 2, 3), (1, 2, 4), (2, 3, 4), (2,3,5)]
  </code></pre>
  
  <p>I am looking out in pyspark, since I have more than 1000 as my elements to choose
  1000 C_3</p>