Python4 min read

Python Variables

Learn to store data using variables in Python.

Emily Davis
December 18, 2025
0.0k0

Store data with variables.

What are Variables?

Variables hold data. Think of them as labeled boxes.

Creating Variables

```python name = "John" age = 25 city = "New York" is_student = True

print(name) # Output: John print(age) # Output: 25 ```

Variable Types

```python # String (text) greeting = "Hello"

Integer (whole number) count = 10

Float (decimal) price = 19.99

Boolean (True/False) is_active = True ```

Changing Variables

```python score = 0 score = 10 score = score + 5 # Now score is 15 ```

Remember

- No need to declare type - Names are case-sensitive - Use meaningful names

#Python#Beginner#Variables