为了实现这样一个功能
a=input("Enter N = ")
b=int(a)
for i in range(b-1):
print(" ",end='')
print("*",end='')
print("\n")
for i in range(1,b-1):
for j in range(b-i-1):
print(" ",end='')
print("*",end='')
for l in range(2*i-1):
print("#",end='')
print("*",end='')
print("\n")
if b>1:
for i in range(2*b-1):
print("*",end='')
应该还可以改简单一点。