title: In python, how do I print a table using double for loops?
body: <p>Here is my python code, </p>
  
  <pre><code>from fractions import gcd 
  print "| 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
  print "-----------------------------------"
  xlist = range(2,16)
  ylist = range(2,51)
  for b in ylist:
       print b, " | "
       for a in xlist:
          print gcd(a,b)
  </code></pre>
  
  <p>I'm having trouble printing a table that will display on the top row 2-15 and on the left column the values 2-50. With a gcd table for each value from each row and each column. </p>
  
  <p>Here is a sample of what I'm getting</p>
  
  <p>| 2 3 4 5 6 7 8 9 10 11 12 13 14 15</p>
  
  <hr>
  
  <p>2  | </p>
  
  <p>2</p>
  
  <p>1</p>
  
  <p>2</p>