title: Getting a default value on index out of range in Python
body: <pre><code>a=['123','2',4]
  b=a[4] or 'sss'
  print b
  </code></pre>
  
  <p>I want to get a default value when the list index is out of range (here: <code>'sss'</code>).</p>
  
  <p>How can I do this?</p>