incrementing characters

Robert Amesz rcameszREMOVETHIS at dds.removethistoo.nl
Tue Jul 24 17:43:39 CEST 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