What are data types?
Just like in real life, Python works with different kinds of information. You can’t add someone’s name to their age - they’re different types of data. Python has four main data types you’ll use constantly:- Numbers for counting and calculations
- Text for words and messages
- True/False for decisions
The main types
Why we need data types
Python needs to know what type of data you’re working with:Checking types
You can always check what type something is withtype():
Start learning
Pick a data type to explore - numbers are a great place to start!Learn about numbers
Integers and floats