None,Nan or NA as a return value

Since None is a special singleton, you check whether a given value is null using the referential equality operator, is. So if myVariable is None:.

You never want to drive control flow from the string representation of anything besides literal strings. Python is object oriented. Take advantage.

2 Likes