Python–使用 for 语句用“ * ”打印菱形 #菱形的打印 layer = int(input("请输入需要打印的层数:")) for x in range(1, layer + 1): #先打印空格 space_num = layer <