how can i get 'sss' using python
Posted
by zjm1126
on Stack Overflow
See other posts from Stack Overflow
or by zjm1126
Published on 2010-04-04T14:10:17Z
Indexed on
2010/04/04
14:13 UTC
Read the original article
Hit count: 341
a=['123','2',4]
b=a[4] or 'sss'
print b
i want to get a defalt value when list index out of range..
how to do this ..
thanks
© Stack Overflow or respective owner