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 = NoneIn 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
BeginnerDeclare a variable named nothing and assign it the value None.
Cheat sheet
In Python, None represents "no value" or "nothing":
empty_box = NoneTry it yourself
# Type your code below
nothing = ?
# Don't change the line below
print(f'nothing = {nothing}')This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Logical Operators Part 48Loops
For LoopWhile LoopBreakContinueRecap - FactorialThe Range FunctionNested LoopRecap - Dynamic Input3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsRecap - Simple MathComparison Operators9Functions
Declare a FunctionArgumentsReturnRecap - Sigma FunctionRecap - Validation FunctionDefault Values12Iterating Over Sequences
Iterating Over ElementsThe Enumerate FunctionIterating Over Strings Part 1Iterating Over Strings Part 2