如何在python中逐次循环地打印以下数列?
5
54
543
5432
54321
下面我展示了我的代码:
while (i <= n):
j = 1
while (j <= 1):
print(j,end='')
j+=1
print()
i += 1
发布于 2022-10-27 04:46:58
i = 5
while i>= 1:
j = 5
while j >= i:
print(j, end=" ")
j -= 1
i-=1
print()
#试试这段代码。
https://stackoverflow.com/questions/74216778
复制相似问题