Tweeted By @jeremyphoward
Another trick:
— Jeremy Howard (@jeremyphoward) October 22, 2019
```
def flatten (x): return list(itertools.chain.from_iterable(x))
```
NB: the `sum` approach to this is *very* slow on long lists! :O
Another trick:
— Jeremy Howard (@jeremyphoward) October 22, 2019
```
def flatten (x): return list(itertools.chain.from_iterable(x))
```
NB: the `sum` approach to this is *very* slow on long lists! :O