Home > other >  How to print symbols vertically in python?
How to print symbols vertically in python?

Time:02-09

I just want to print a symbol a certain amount of times vertically.

def draw_symbol():
        print()
        symbol = ""
        for num in range(8):
            symbol  = "*"        
        print(symbol)
        return

    draw_row()

The output is "*******" but it is supposed to be vertical.

CodePudding user response:

def draw_symbol():
    for num in range(8):
        print("*")
    return
draw_symbol()

would result in:

*
*
*
*
*
*
*
*
  •  Tags:  
  • Related