ternary operator python if not noe code example
Example: Python Ternary Operator Without else
x = 1 > 0 # (True/False)
print(x)
#------------------------------------------
if (1 > 0): x = "something" # put any value
print(x)
x = 1 > 0 # (True/False)
print(x)
#------------------------------------------
if (1 > 0): x = "something" # put any value
print(x)