I was looking for Python “sequence generator” code earlier today. By that, I’m thinking of a method to increment an arbitrary string of letters and numbers in an orderly way.
I figured there should be code samples out there to make quick work of it, but it was more challenging to find something than expected. Part of it might be my weak conceptual grasp of the subject. Maybe I just lacked the necessary search terms. With the words I did have — sequence and generator — I got a lot of static since these terms describe basic Python concepts.
I finally resorted to crafting my own sequence generator. To you, Future Searcher, I hope it will be useful. It is easy enough to convert this into a function, which I did for my script. (Or maybe you’ll want an actual generator!) I won’t elaborate on it more. If you’re looking for this, you probably know everything you need to know.
(I’m releasing this into the public domain. Use the code freely and …
