打印正方形 length =int(input("输入")) for i in range(length):# 5 if i==0 or i ==length-1: # 0 4 print("* "*length) else: print("* "+(length-2)*" "*2+"*") #每次打印两个