What is the best way to do a list[0] with a default value in python?
<p>I am looking for a list functionnality in Python.</p>

<p>I am doing this :</p>

<pre><code>abcd = [1, 2, 3, 4]
try:
    item = list[5]
except:
    item = 0
</code></pre>

<p>How can I make it looks like :</p>

<pre><code>item = abcd.get(5, 0)
</code></pre>

<p>Thanks for your help</p>
