On Wed, Feb 25, 2009 at 1:16 AM, Helmut Jarausch <[email protected]> wrote: > Sorry if this is too simple but I couldn't find. > > I vaguely remember there is a means to assign a variable length tuple > and catch the 'rest' like > > S="a,b,c,d" > > (A,B,<list of remaining items>) = S.split(',')
In Python 3.0 (IIRC):
A, B, *rest = S.split(',')
Cheers,
Chris
--
Follow the path of the Iguana...
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
