Terry Reedy:
>  >>> a,b,*rest = list(range(10))
>  >>> a,b,rest
> (0, 1, [2, 3, 4, 5, 6, 7, 8, 9])
>  >>> a,*rest,b = 'abcdefgh'
>  >>> a,rest,b
> ('a', ['b', 'c', 'd', 'e', 'f', 'g'], 'h')

For the next few years I generally suggest to specify the Python
version too (if it's 2.x or 3.x).
This is Python 3.x.

Bye,
bearophile
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to