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 printTTriangle(height):
for row in range(1,height+1):
# print row T's
for col in range(1,row+1):
print 'T',
print
Thank you all for your help!
See Question&Answers more detail:os