Is there a ternary conditional operator in Python?

I'm reading this article, here and want to know if a ternary conditional operator available in Python?

avatar syedmubashshirhasan
@syedmubashshirhasan

2 Kontribusi 1 Poin

Diperbarui 1 tahun yang lalu

1 Jawaban:

<div>I guess something like this</div><pre>value <strong>=</strong> a <strong>if</strong> a &lt; b <strong>else</strong> b</pre>

avatar hilmanski
@hilmanski

2673 Kontribusi 2133 Poin

Dipost 1 tahun yang lalu

Login untuk ikut Jawaban