Consider the following code:
if b > 5:
a += 1
elif b < 0:
a += 2
else:
a += 3
In C there is a convenient (although not very transparent) way to write it in one line:
b > 5 ? a+=1 : b < 0 ? a+=2 : a+=3;
Is there a way to write it that concisely in Python?