0 points
Python:
return a or b
i like it because it reads like a sentence so it somewhat makes sense
and you can make it more comprehensive if you want to:
return a if a is not None else b
0 points
*
Python:
return a or b
i like it because it reads like a sentence so it somewhat makes sense
and you can make it more comprehensive if you want to:
return a if a is not None else b
Post funny things about programming here! (Or just rant about your favourite programming language.)
6.7K
Monthly active users
796
Posts
7.3K
Comments