资讯

I recently switched to using python 2.5 from 2.4, one of the new language level features in 2.5 is conditional expressions. Which I thought was odd because I was ...
Does python have a syntax like this?<BR><BR>a=[logical_statement]?b:c<BR><BR>Where, in assigning a, it evaluates logical_statement for truth, and if true, assigns b to a, otherwise assigns c to a.