Incrementing a string

Paul Rubin http
Wed Sep 15 20:18:25 EDT 2004


John Velman <velman at cox.net> writes:
> But it looks like going beyond z to aa and so on is (relatively)
> complicated.
> 
> In truth, it seems unlikely that I would ever go beyond z in using my
> application, and certainly not beyond zz which wouldn't be too hard to
> program.  But I hate to build in limitations no matter how reasonable.

Python doesn't have that feature built in, so you have to think about
how Perl really does it, and implement something similar in Python.
Yes, it will be a little bit complicated, but the Perl implementers
had to deal with the same complexity, and it's a decent exercise for
you to do the same.



More information about the Python-list mailing list