[ad_1]
The Python if ternary operator syntax requires an else, like so:
x = 2 if y < 5 else 4
[ad_2]
solved Shorthand ‘if’ is throwing a syntax error
[ad_1]
The Python if ternary operator syntax requires an else, like so:
x = 2 if y < 5 else 4
[ad_2]
solved Shorthand ‘if’ is throwing a syntax error