incrementing characters

Robert Amesz rcameszREMOVETHIS at dds.removethistoo.nl
Tue Jul 24 11:43:39 EDT 2001


Lee Harr wrote:

> perl makes this simple:
> 
> $s = "aabc";
> $s++;
> print "$s\n";
> $s = "zzzz";
> $s++;
> print "$s\n";
> 
> would print:
> aabd
> aaaaa

Ugh! Who ever though up such an obtuse scheme? Thanks for reminding me 
why I dislike Perl.


Robert Amesz




More information about the Python-list mailing list