We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

NoneType Variables

Not all variables have a value. We can make an "empty" variable by setting it to None. None is a special value in Python that represents the absence of a value. It is not the same as zero, False, or an empty string.

my_mental_acuity = None

The value of my_mental_acuity in this case is None until we use the assignment operator, =, to give it a value.

None Is NOT a String

NoneType is not the same as a string with a value of "None":

my_none = None  # this is a None-type
my_none = "None"  # this is a string with the value "None"

Assignment

Declare a variable named enemy and set it to None. Don't change the print() function.