1

I have a multiple lines like

NO = """###
###
###"""
LR = """###

###"""

and i have an array = [NO, LR] i need to print it line by line. I try

for i in array:
    print i,

it print

###
###
### ###

###

but i need this:

######
###
######

thanks for help.

Leva
  • 25
  • 5
  • That's what you are looking for? http://stackoverflow.com/questions/493386/how-to-print-in-python-without-newline-or-space – Ami Hollander Jul 04 '16 at 19:50

1 Answers1

0

Typing "NO" and "RL" in a python terminal, you'll see '###\n###\n###' and '###\n\n###', respectively. The '\n' character is a empty line, so, that's why those strings are being printed with unnecessary lines. Make logic to not print unnecessary '\n' characters.