Python5 min read
Python Data Types
Understand different types of data in Python.
Emily Davis
December 18, 2025
0.0k0
Different types of data in Python.
Main Data Types
```python # String name = "Sarah"
Integer age = 30
Float height = 5.6
Boolean is_working = True
List cities = ["Boston", "Dallas", "Seattle"]
Dictionary person = {"name": "Mike", "age": 28} ```
Check Data Type
```python print(type(name)) # <class 'str'> print(type(age)) # <class 'int'> print(type(height)) # <class 'float'> ```
Type Conversion
```python age = "25" # String age = int(age) # Convert to integer print(age + 5) # Output: 30
price = 19.99 price = int(price) # Now price is 19 ```
Remember
- Python auto-detects type - Use type() to check - Convert types when needed
#Python#Beginner#Data Types