How to “test” NoneType in python?
So how can I question a variable that is a NoneType? Use is operator, like this Why this works? Since None is the sole singleton object of NoneType in Python, we can use is operator to check if a variable has None in it or not. Quoting from is docs, The operators is and is not test for object identity: x is y is true if and only if x and y are the same object. x is … Read more