SyntaxStudy
Sign Up
Python Beginner 8 min read

Python Data Types

Python Data Types

Python has several built-in data types.

Core Types

TypeExample
int42
float3.14
str"hello"
boolTrue/False
list[1,2,3]
dict{"key":"val"}
tuple(1,2,3)
set{1,2,3}
x = 10; print(type(x))  # int
y = 3.14; print(type(y))  # float
Pro Tip

Use isinstance(x, int) to check type safely.