Smith, Jeff wrote:
> Speaking of which, I note that there is a pop for lists but no shift.  
> Is there a Python idiom for this or is it just
>     val = mylist.shift() =>    (val, mylist) = (mylist[0], mylist[1:])
> which seems a little clumsy.

val = mylist.pop(0)

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to