How to condense if/else into one line in Python?

Possible Duplicate:
Python Ternary Operator
Putting a simple if-then statement on one line

Is there a way to compress an if/else statement to one line in Python?
I oftentimes see all sorts of shortcuts and suspect it can apply here too.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)