Data Types in Python — a practical guide to Python data types with clear examples you can reuse in real projects.
Python Tutorial Series (9/95). Prefer one article? Read the complete Python tutorial.
Short description
Use `type()` to inspect values. Python is dynamically typed — the same variable can hold different types over time.
Common types
print(type(10)) # int
print(type(3.14)) # float
print(type('hi')) # str
print(type(True)) # bool
print(type([1, 2])) # list
print(type({'a': 1})) # dict