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>As said before, your approach was a bit off.  I implemented one that takes your list numbers and then builds the result line by line (i.e., top, middle, then bottom).</p>

<pre><code>class zero:
    top = " __ "
    mid = "|  |"
    bot = "|__|"

class one:
    top = "    "
    mid = "   |"
    bot = "   |"

class two:
    top = " __ "
    mid = " __|"
    bot = "|__ "

class three:
    top = " __ "
    mid = " __|"
    bot = " __|"

class four:
    top = "   "
    mid = "|_|"
    bot = "  |"

class five:
    top = " __ "
    mid = "|__ "
    bot = " __|"

class six:
    top = " __ "
    mid = "|__ "
    bot = "|__|"

class seven:
    top = "  __ "
    mid = "    |"
    bot = "    |"

class eight:
    top = " __ "
    mid = "|__|"
    bot = "|__|"

class nine:
    top = " __ "
    mid = "|__|"
    bot = "   |"

def printnum(list):
    chunks = ['top','mid','bot']
    for section in chunks:
        string = ''
        for x in list:
            if x == '1':
                string += getattr(one, section)
            elif x == '2':
                string += getattr(two, section)
            elif x == '3':
                string += getattr(three, section)
            elif x == '4':
                string += getattr(four, section)
            elif x == '5':
                string += getattr(five, section)
            elif x == '6':
                string += getattr(six, section)
            elif x == '7':
                string += getattr(seven, section)
            elif x == '8':
                string += getattr(eight, section)
            elif x == '9':
                string += getattr(nine, section)
            elif x == '0':
                string += getattr(zero, section)
            elif x == 'Quit':
                break
            else:
                print "Number not entered"
        print string

x = raw_input("Type the number you would like printed: ")
a = list(x)

printnum(a)
</code></pre>

python python-2.7