SyntaxFix
Write A Post
Hire A Developer
Questions
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