Home Coding Data Types – None

Data Types – None

0
Data Types – None

# Data Types - NONE
# None is a Python keyword
# Be sure to write it with the first capital letter
# 
# None is assigned to a variable when we want it empty
# something that points to nothing.
# It's not a 0 or an empty value. It's a unique Python object.

null1 = None        			# I can be whatever I want. I'm a None
null2 = type(null1)			# Are you sure to be None?
									# Let me check what you are.

null3 = null1 is None   	# Hey null1, are you None?
null4 = null1 is not None	# Let's see, I'm guessing you are not None.
null5 = ""						# I'm an empty string
null6 = type(null5)			# Guess what I'm


# copy www.AEC.codes
OUT = (null1 ,null2 ,null3 ,null4, null5, null6)

# You can see in the output that null1 is not trow to output, 
# call a None variable by itself do not return anything, 
# you have to use some other methods to see a None variable.