"Jabin Jezreel" <jabinjezr...@gmail.com> wrote
What is the idiomatic way to write the right side of
   (a, b) = (l[0:2], l[2:])
?
(not worried about the parens, just the splitting of the sequence)

I think you have it.
I'm not aware of any better way.

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

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

Reply via email to