# Data Types — Python

Source: https://www.geekswithgeeks.com/en/python/py-data-types

> Numbers, text, and the four collections.

## Scalars

`int` (unbounded), `float`, `complex`, `str` (immutable), `bool`, and `None`.

## The four collections

list mutable/ordered · tuple immutable · set unique/unordered · dict key→value.

```python
nums = [1, 2, 3]
nums.append(4)
point = (10, 20)
tags = {"a", "b"}
person = {"name": "Ada", "age": 36}
person["age"]        # 36
```

**Quiz:** Which collection is immutable?

- [ ] list
- [x] tuple
- [ ] dict

*Answer:* tuple. A tuple can't be changed after creation.
