title: Converting for loops to while loops in python
body: <p>I am struggling to find an efficient way to convert these <em>for</em> loops to a working set of <em>while</em> loops. Any Suggestions? I am using 2.7</p>
  
  <pre><code>def printTTriangle(height):
   for row in range(1,height+1):
      # print row T's
      for col in range(1,row+1):
          print 'T', 
      print
  </code></pre>
  
  <p>Thank you all for your help!</p>