Apologies if this has been asked before, but I couldn\'t see it anywhere.
Essentially I\'ve come across a scenario where i need to make use of an if statement inside
Use the exp1 if cond else exp2 syntax.
exp1 if cond else exp2
rate = lambda T: 200*exp(-T) if T>200 else 400*exp(-T)
Note you don't use return in lambda expressions.
return