[x+1 if x >= 45 else x+5 for x in l]
And for a reward, here is the comment, I wrote to remember this the first time I did this error:
Python's conditional expression is a if C else b and can't be used as:
[a for i in items if C else b]
The right form is:
[a if C else b for i in items]
Even though there is a valid form:
[a for i in items if C]
But that isn't the same as that is how you filter by C, but they can be combined:
[a if tC else b for i in items if fC]