Anand wrote: > Suppose i have a big list and i want to take tke the first one and rest > of the list like car/cdr in lisp. > is there any easy way to do this in python?
It seems like overkill to me to make the syntax more complex just to avoid writing a one-line function. def first_rest(seq): return seq[0], seq[1:] -- http://mail.python.org/mailman/listinfo/python-list