incrementing characters

Lee Harr missive at
Mon Jul 23 19:00:25 EDT 2001

On Mon, 23 Jul 2001 18:22:02 GMT, Nick Perkins <nperkins7 at> wrote:
> "Holland King" <insanc at> wrote in message
> news:9jhojp$t7h$1 at
>> how do you interate a letter or string? for instance:
>> a + 1 = b
>> or
>> aa + 1 = ab
>> etc. in c it is similar to above and i am guessing there is an equally
>> simple way to do it in python, i just can't figure it out. thank you
>> for your time and help.

perl makes this simple:

$s = "aabc";
print "$s\n";
$s = "zzzz";
print "$s\n";

would print:

I think in python I would create some kind of IncrementableString class
which does exactly what I want it to do on only the right kind of data.

More information about the Python-list mailing list