python打印图形

i = 0
while i < 5:
    # print('*****') 效果与下行相同
    print('*'*5)
    i+=1

print('

')

i = 1
while i < 6:
    print('*'*i)
    i+=1

print('

')

i = 1
while i < 6:
    print('*'*(6-i))
    i+=1

原文地址:https://www.cnblogs.com/FlyingLiao/p/11147998.html