Menu
Coddy logo textTech

Empty Variables

Part of the Fundamentals section of Coddy's Python journey — lesson 8 of 77.

In Python, None is a special value that represents "nothing" or "no value." It's like an empty box - it exists, but there's nothing inside it. For example:

empty_box = None

In a real scenario you could use None to indicate that something was not initialized yet.

For example:

score = None  # Score hasn't been calculated yet
name = None   # Name hasn't been entered yet 

Note: None is not the same as 0, an empty string "", or False. Those are actual values — zero, empty text, and false. None means there is no value at all. The absence of a value is not an error; it simply means nothing has been assigned yet.

challenge icon

Challenge

Beginner

Declare a variable named nothing and assign it the value None.

Cheat sheet

In Python, None represents "no value" or "nothing":

empty_box = None

Try it yourself

# Type your code below
nothing = ?

# Don't change the line below
print(f'nothing = {nothing}')
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals