如何在 python 中垂直打印符号?
How to print symbols vertically in python?
我只想垂直打印一定次数的符号。
def draw_symbol():
print()
symbol = ""
for num in range(8):
symbol += "*"
print(symbol)
return
draw_row()
输出是“*******”,但它应该是垂直的。
def draw_symbol():
for num in range(8):
print("*")
return
draw_symbol()
会导致:
*
*
*
*
*
*
*
*
我只想垂直打印一定次数的符号。
def draw_symbol():
print()
symbol = ""
for num in range(8):
symbol += "*"
print(symbol)
return
draw_row()
输出是“*******”,但它应该是垂直的。
def draw_symbol():
for num in range(8):
print("*")
return
draw_symbol()
会导致:
*
*
*
*
*
*
*
*