[Tutor] (a, b) = (l[0:2], l[2:])

Jabin Jezreel jabinjezreel at gmail.com
Wed May 13 05:04:20 CEST 2009


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090512/95e050a4/attachment.htm>


More information about the Tutor mailing list