Python ternary operator [duplicate]

Possible Duplicate:
Ternary conditional operator in Python

var foo = (test) ? "True" : "False";

What would this look like in Python?

Using Python 2.7 if that makes a difference.


PEP 308 adds a ternary operator:

foo = "True" if test else "False"

It's been implemented since Python 2.5