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

# Random

## Flatten a list of lists

```python
import itertools

s = list(itertools.chain(*sentences))
```

## Progress bar on loops

Use `tqdm`

## Fore named arguments

A bare `*` is used to force the caller to use named arguments - so you cannot define a function with `*` as an argument when you have no following keyword arguments.
