Using python I was trying to execute if and else in a single line as below
expr = "no remainder" if 5% 2 == 0 else pass
print(expr)
output:
SyntaxError: invalid syntax
Expected output:
It should pass condition without printing anything
Please help me on how to overcome the above issue