On 2/16/07, <b class="gmail_sendername">Wolfram Kraus</b> &lt;<a href="mailto:wolfram.kraus@fen-net.de">wolfram.kraus@fen-net.de</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 16.02.2007 08:01, xiufeng liu wrote:<br>&gt; Hi, all,<br>&gt;<br>&gt; In python if there is any similar way like in Java, or C++ to express<br>&gt; the following:<br>&gt; str = (a&gt;b?&quot;Yes&quot;:&quot;NO&quot;)<br>
&gt;<br>&gt;<br>&gt; thanks!<br><br>In Python 2.5 you can do the following (untested):<br><br>str = &quot;Yes&quot; if a&gt;b else &quot;No&quot;<br><br>See: <a href="http://docs.python.org/whatsnew/pep-308.html">http://docs.python.org/whatsnew/pep-308.html
</a><br><br>HTH,<br>Wolfram<br></blockquote></div><br>Before 2.5, you could generally write:<br><br>str = (a &gt; b) and &quot;Yes&quot; or &quot;No&quot;<br><br>&nbsp; -Arcege<br clear="all"><br>-- <br>There&#39;s so many different worlds,
<br>So many different suns.<br>And we have just one world,<br>But we live in different ones.