Is there a better way to chose a slice of a list?

Ben Finney ben+python at benfinney.id.au
Tue May 19 19:31:54 EDT 2009


walterbyrd <walterbyrd at iname.com> writes:

> On May 8, 5:55 pm, John Yeung <gallium.arsen... at gmail.com> wrote:
> > On May 8, 3:03 pm,walterbyrd<walterb... at iname.com> wrote:
> > I think you should provide much more information, primarily why you
> > want to do this.  What is the larger goal you are trying to achieve?
> 
> I am just looking for a less verbose, more elegant, way to print a
> slice of a list.

That's just the same micro-goal re-stated. What is your larger problem
of which this is a part? Perhaps a better approach can be suggested when
that context is known.

-- 
 \                 “What's another word for Thesaurus?” —Steven Wright |
  `\                                                                   |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list