list assignment

Jeffrey Schwab jeff at schwabcenter.com
Wed Feb 22 15:51:15 EST 2006


Raymond Hettinger wrote:
>>     [spam, ham] = ['yum', 'YUM']
>>
>>I don't see how this is any different than a tuple unpacking assignment:
>>
>>     >>> a, b = 1, 2
> 
> 
> It's not different.  They are ways of writing the same thing.

TMTOWTDI, after all. :)



More information about the Python-list mailing list