can't assign to function call Error-Python
<p>So I'm working on a project to create a postal bar code out of an inputted 5 digit zipcode
this is what i have so far and i'm not sure why i'm getting this error or how to approach fixing it, appreciate the help!</p>

<pre><code>zipcode=input("What is your 5 digit zipcode?")
s=zipcode.split(",")

def correctiondigit(zipcode):     #LAST BLOCK OF 6 BLOCK BARCODE
    zipcode.split()
    total=int(zipcode[0])+int(zipcode[1])+int(zipcode[2])+int(zipcode[3])+int(zipcode[4])
    if total % 10!=0:
        total=total+(10-total%10)  


print(correctiondigit(zipcode))    #not working on this yet        

def barcode(a):                                                        
    if a==0:
        print("||:::") 
    elif a==1:
        print(":::||")
    elif a==2:
        print("::|:|")
    elif a==3:
        print("::||:")
    elif a==4:
        print(":|::|")
    elif a==5:
        print(":|:|:")
    elif a==6:
        print(":||::")
    elif a==7:
        print("|:::|")
    elif a==8:
        print("|::|:")
    elif a==9:
        print("|:|::")



for the_zipcode in s:
    print(barcode(the_zipcode))  
</code></pre>

<p>I am fairly certain your problem is your use of <code>s=zipcode.split(",")</code>. What that does is split the string that is put in by the user (if you're using python 3) into an array of strings, where each element is delimited by a comma. For example:</p>

<pre><code>'11111'.split(',') # ['11111']
'11111,12345'.split(',') # ['11111', '12345']
</code></pre>

<p>That is almost certainly not what you want, since you're asking the user to input a 5-digit zip code. If you just use the input directly, I think you'll get what you want.</p>

<p>That is:</p>

<pre><code>zipcode=input("What is your 5 digit zipcode?")
# . . .
for digit in zipcode:
  print(barcode(digit)) 
</code></pre>

python syntax-error barcode