If you have experience with other programming languages, like C or Java, then youβve probably heard of the concept of null. Many languages use this to represent a pointer that doesnβt point to anything, to denote when a variable is empty, or to mark default parameters that you havenβt yet supplied. null is often defined to be 0 in those languages, but null in Python is different.
Python uses the keyword None to define null objects and variables. While None does serve some of the same purposes as null in other languages, itβs another beast entirely. As the null in Python, None is not defined to be 0 or any other value. In Python, None is an object and a first-class citizen!
In this course, youβll learn:
- What
Noneis and how to test for it - When and why to use
Noneas a default parameter - What
NoneandNoneTypemean in your traceback - How to use
Nonein type checking - How
nullin Python works under the hood






