> For the complete documentation index, see [llms.txt](https://ricardomol.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ricardomol.gitbook.io/notes/backend/python/quizes-tips.md).

# Quizes / Tips

## Itertools.groupby()

```python
>>> from itertools import groupby
>>> input = "111003312"
>>> for k, g in groupby(input):
...     print ("k={}. l={}".format(k, len(list(g))))
... 
k=1. l=3
k=0. l=2
k=3. l=2
k=1. l=1
k=2. l=1
```
