This is nice. Though I notice a couple of things that I’d personally prefer to do differently.
- Passing an iterable that isn’t a list (I.e. string) simply returns the string. For me, this isn’t expected behavior — but it very well may be for you.
- The use of “cuts” is overly-complex and not what I’d consider idiomatic python.
Thoughts on something like this?:
Please excuse my unsolicited feedback and I’d love to hear your thoughts.