*-unpacking (Re: Fun with fancy slicing)
David Eppstein
eppstein at ics.uci.edu
Fri Oct 3 01:36:00 EDT 2003
In article <Jd7fb.484435$cF.170532 at rwcrnsc53>,
"David C. Fox" <davidcfox at post.harvard.edu> wrote:
> In the mean time, it isn't too hard to write a function which does this:
>
> def first_rest(x):
> return x[0], x[1:]
Shouldn't that be called cons?
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list