Arithmetic sequences in Python
Alex Martelli
aleax at mail.comcast.net
Mon Jan 16 11:30:46 EST 2006
Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:
> Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes:
> > For finite sequences, your proposal adds nothing new to existing
> > solutions like range and xrange.
>
> Oh come on, [5,4,..0] is much easier to read than range(5,-1,-1).
But not easier than reversed(range(6)) [[the 5 in one of the two
expressions in your sentence has to be an offbyone;-)]]
Alex
More information about the Python-list
mailing list