I am trying to make a lcd program so that all the numbers are printed side by side and its not working
<p>I am trying to print out ascii numbers side by side in python after the previous number is printed. If I put a comma after the last line in the function only the top part of the next number is printed.</p>

<pre><code>def zero():
    print " __ "
    print "|  |"
    print "|__|"

def one():
    print "    "
    print "   |"
    print "   |"

def two():
    print " __ "
    print " __|"
    print "|__ "

def three():
    print " __ "
    print " __|"
    print " __|"

def four():
    print "|_|"
    print "  |"

def five():
    print " __ "
    print "|__ "
    print " __|"

def six():
    print " __ "
    print "|__ "
    print "|__|"

def seven():
    print "  __ "
    print "    |"
    print "    |"

def eight():
    print " __ "
    print "|__|"
    print "|__|"

def nine():
    print " __ "
    print "|__|"
    print "   |"



x = raw_input("Type the number you would like printed: ")
a = list(x)
for x in a:
    if x == '1':
        one(),
    elif x == '2':
        two(),
    elif x == '3':
        three(),
    elif x == '4':
        four(),
    elif x == '5':
        five(),
    elif x == '6':
        six(),
    elif x == '7':
        seven(),
    elif x == '8':
        eight(),
    elif x == '9':
        nine(),
    elif x == '0':
        zero(),
    elif x == 'Quit':
        break
    else:
        print "Number not entered"
</code></pre>

<p>This code prints three lines of output:</p>

<pre><code>print " __ "
print "|__|"
print "   |"
</code></pre>

<p>One that is printed, there is no good way to go back up and print the next number. </p>

<p>The solution is to print the first line of each character, then the second line of each character etc...</p>

<p>So, to print 98, instead of:</p>

<pre><code>print " __ "   # 9, row 1
print "|__|"   # 9, row 2
print "   |"   # 9, row 3

print " __ "   # 8, row 1
print "|__|"   # 8, row 2
print "|__|"   # 8, row 3
</code></pre>

<p>You have to:</p>

<pre><code>print " __ ",  # 9, row 1
print " __ ",  # 8, row 1
print

print "|__|",  # 9, row 2
print "|__|",  # 8, row 2
print

print "   |",  # 9, row 3
print "|__|",  # 8, row 3
print
</code></pre>

<p>Note that I added a comma after each line, so it does not make a line break. Then I added a line break (empty print) once for each line, after all characters.</p>

<p>Now, to print any number, you'll have to go through all characters three times: once for each line...</p>

python python-2.7