Python Data Types
A data type tells Python what kind of value is being stored.
Common Data Types
int— whole numbersfloat— decimal numbersstr— textbool— True or Falselist— ordered mutable collectiontuple— ordered immutable collectionset— unordered collection of unique valuesdict— key-value collectionNone— absence of a value
Checking a Type
Use the type() function.
print(type(10))
print(type(3.14))
print(type("Python"))
Python automatically determines the type from the value assigned.