Printing n elements per line in a list

John Machin sjmachin at lexicon.net
Wed Aug 16 01:38:13 EDT 2006


Dan Sommers wrote:
> On 15 Aug 2006 18:33:51 -0700,
> "John Machin" <sjmachin at lexicon.net> wrote:

> > ...         ctr = (ctr + 1) % n
>
> I'm old enough to remember the days when we avoided division like the
> plague.  Remember those zippy 1MHz (yes, that's an M and not a G) CPUs
> with less than a handful of 8-bit registers?  Old habits die hard.  ;-)
> 

How did you avoid division when testing for leap year?




More information about the Python-list mailing list