# Python

## Dictionary

* Check key exists in dictionary `dict`: `if key in dict:`
* How to iterate: [a good tutorial](https://realpython.com/iterate-through-dictionary-python/).

## String

* Trimming:

```python
s = s.strip()
s = s.lstrip()
s = s.rstrip()
```

* Replace:

```python
s = s.replace('\t', ' ')
```

## Debug

* `str` vs `repr`: <https://www.geeksforgeeks.org/str-vs-repr-in-python/>, <https://stackoverflow.com/questions/1436703/difference-between-str-and-repr>.
