I am struggling to find an efficient way to convert these for loops to a working set of while loops. Any Suggestions? I am using 2.7
def pr
You can get rid of the inner loop with string multiplication operator (*) :
*
def printTTriangle(height): j = 1 while j <= height: print 'T' * j + '\n ' j += 1