用Python打印爱心的方法很简单,可以使用简单的循环语句,如下:
for i in range(3): for j in range(3-i): print(" ", end="") for j in range(2i+1): print("", end="") print("")
for i in range(2): for j in range(2-i): print(" ", end="") for j in range(2i+1): print("", end="")
用Python打印爱心的方法很简单,可以使用简单的循环语句,如下:
for i in range(3): for j in range(3-i): print(" ", end="") for j in range(2i+1): print("", end="") print("")
for i in range(2): for j in range(2-i): print(" ", end="") for j in range(2i+1): print("", end="")