如何用Python2.7版本写出这俩啊

求大神帮忙
2024-11-15 15:23:09
推荐回答(1个)
回答1:

for a in range(2,7):
(缩进)for b in range(1,a):
(缩进)(缩进)print(b,end='')
(缩进)print('')
for a in range(6,1,-1):
(缩进)for b in range(1,a):
(缩进)(缩进)print(b,end='')
(缩进)print('')