Interview Q&A / Python
Python interview questions
Lists, dictionaries, generators, decorators and the Python questions asked in service-company and data roles.
Prefer rapid revision? Practise Python short interview answers →
- What is None in Python and how is it different from 0, False or an empty string?
None is a special singleton object of type NoneType that means no value. It is falsy like 0, False and '', but it is not equal to any of them. Functions without a return statement return None, and you should test for it with is None.
BeginnerQuick answer1 min read