python-----矩形边框
矩形边框: [root@python py]# vim biankuan.py #!/usr/bin/env python3 line = int(input("请输入一个数字: ")) for i in range(line): if i == 0 or i == line-1: for j in range(line): print("*",end="") else: for j in range(line): if j == 0 or j == line-1: print("*",end="") else: print(" ",end="") print("") ~ [root@python py]# python biankuan.py 请输入一个数字: 10 ********** * * * * * * * * * * * * * * * * **********