In this answer it is stated that you can use return A+1 if A > B else A-1
in python 3, yet when i try to use it:
def max3(a,b,c):
return a if a > b and c
return b if b > c else c
i get an invalid syntax error. I've tried looking online but I can't find anything on this, if anyone could help I'd appreciate it.
thanks.