variable length tuple assignment

Helmut Jarausch jarausch at
Wed Feb 25 10:16:38 CET 2009

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


(A,B,<list of remaining items>) = S.split(',')

I know I could do
SL= split(',')
Rest= SL[2:]

but is there some shorthand for this?

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

More information about the Python-list mailing list