Python does not support the syntax 'true? 2:3'

python does not support

2==3?1:0

is this syntax, or is there a more elegant syntax?

Jul.28,2021

a = 1 if 2 = = 3 else 0


2 = = 3 and 1 or 0

Menu