Python list zeroth element mix up
<p>I want to write a function decode(chmod) that takes a three digit permissions number as a string and returns the permissions that it grants.
It seems to be working unless I ask for the zeroth element. I couldn't figure out why so.</p>

<pre><code>def decode(chmod):

    liste = [int(i)for i in str(chmod)]


    chmod = ["None", "Execute only", "Write only", 
        "Write and Execute", "Read only", 
        "Read and Execute", "Read and Write",
        "Read Write and Execute"] 

    for i in liste:

        print chmod[i]

    return liste

print decode(043)
</code></pre>

<p>You need quotes around 043. Try '043'.</p>

python list zero