pyhton 打印菱形

Posted xyg-zyx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pyhton 打印菱形相关的知识,希望对你有一定的参考价值。

for i in range(1,8,2):
    print((**i).center(7))
    if i ==7:
        for i in range(5,0,-2):
            print((* * i).center(7))

技术分享图片

 

以上是关于pyhton 打印菱形的主要内容,如果未能解决你的问题,请参考以下文章