标签:python 数字金字塔 while 实现 end bsp def int pre
def kzkz(ceng):
for i in range(1,ceng+1):
print(" "*(ceng-i),end=‘‘)
n=i
while(n>=1):
print(n,end=‘‘)
n-=1
n+=2
while(n<=i):
print(n,end=‘‘)
n+=1
print()
kzkz(5)
1
212
32123
4321234
543212345
标签:python 数字金字塔 while 实现 end bsp def int pre
原文地址:https://www.cnblogs.com/kzkzkz/p/10344184.html