s = '' print((“ ”).center(9)) for i in range(2,10,2): t = (9-i) print ((''t+st+''t).center(9)) 运行效果如下: 图片发自简书App