Booleans and None

Length: 00:02:34

Lesson Summary:

Learn about how Python represents truthiness and nothingness.

Python Documentation For This Video

Booleans

Booleans represent "truthiness" and Python has two boolean constants: True and False.

Notice that these both start with capital letters. Later we will learn about comparisons operations, and those will often return either True or False.

Representing Nothingness with None

Most programming languages have a type that represents the lack of a value, and Python is no different. The constant used to represent nothingness in Python is None. None is a "falsy", and we'll often use it to represent when a variable has no value yet.

An interesting thing to note about None is that if you type None into your REPL there will be nothing printed to the screen. That's because None actually evaluates into nothing.


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson

Or Log In

Looking For Team Training?

Learn More