📌  相关文章
📜  打印如下所示的框 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:55.577000             🧑  作者: Mango

代码示例1
length = int(input("Enter the side of the square  : "))

for i in range(length):
    for j in range(length):
        if(i == 0 or i == length - 1 or j == 0 or j == length - 1):
            print('*', end = ' ')
        else:
            print(' ', end = ' ')
    print()