(1) variable = a if exper else b
(2) variable = exper and b or c
(3) variable = (exper and [b] or [c])[0]