Possible Duplicate:
Putting a simple if-then statement on one line
I am working on a python expression and I want that expression to be compressed than using the if else statement.
s = [1, 2, 3, 4]
if len(s)>5:
    print s.index(5)
else:
    print 'cant print'
Is there a better way than using as if else statement?
 
     
     
     
     
    