Think of the conditional expression as switching between two values. It is very useful when you're in a 'one value or another' situation, it but doesn't do much else.
If you need to use statements, you have to use a normal if statement instead of a conditional expression.
Keep in mind that it's frowned upon by some Pythonistas for several reasons:
- Some find it "unwieldy" since it goes contrary to the normal flow of thought (thinking of the condition first and then the effects).
- Stylistic reasons. (Although the 'inline if' can be really useful, and make your script more concise, it really does complicate your code)