ValueError vs IndexError, unpacking arguments with string.split

Dan Sommers 2QdxY4RzWzUUiLuE at potatochowder.com
Fri Nov 30 13:25:03 EST 2018


On 11/30/18 12:00 PM, Morten W. Petersen wrote:

 > I guess syntax could be added, so that
 >
 > a, b, @c = some sequence
 >
 > would initialize a and b, and leave anything remaining in c.  We could
 > then call this @ syntax "teh snek".

Close.  ;-)  Try this:

     a, b, *c = [4, 5, 6, 7]



More information about the Python-list mailing list