title: The pythonic way to generate pairs
body: <p>I want something like code below, but "pythonic" style or using standard library:</p>
  
  <pre><code>def combinations(a,b):
      for i in a:
          for j in b:
               yield(i,j)
  </code></pre>