I wrote a Twitter thread about the Python implementation of the look-and-say sequence.
The thread introduces the tools needed:
The thread introduces the tools needed:
- `itertools.chain`
- `itertools.groupby`
And then puts them together into a nice function. The thread was also automatically published on my blog.