i=1 while i <=5 : j =1 while j<= 2*i-1 : print ("*",end="") j+=1 print("") i+=1
示例:
使用Python打印一个直角三角形
原文:http://www.cnblogs.com/xiaobudong/p/7465420.html