使用center函数。 center() 返回一个原字符串居中,并使用空格填充至长度 width 的新字符串
``` python3
```shape = input("")
for i in range(1, 6, 2):
print((shape * i).center(5))
for i in range(3, 0, -2):
print((shape * i).center(5))

使用center函数。 center() 返回一个原字符串居中,并使用空格填充至长度 width 的新字符串
``` python3
```shape = input("")
for i in range(1, 6, 2):
print((shape * i).center(5))
for i in range(3, 0, -2):
print((shape * i).center(5))