variable length tuple assignment
clp2 at rebertia.com
Wed Feb 25 10:41:54 CET 2009
On Wed, Feb 25, 2009 at 1:16 AM, Helmut Jarausch
<jarausch at igpm.rwth-aachen.de> 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
> (A,B,<list of remaining items>) = S.split(',')
In Python 3.0 (IIRC):
A, B, *rest = S.split(',')
Follow the path of the Iguana...
More information about the Python-list