[Tutor] Tuples, Dictionarys and mutable vs. immutable

Sheila King sheila@thinkspot.net
Sun, 25 Feb 2001 20:36:49 -0800


OK, it gets better and better. Now explain this:

>>> mytuple
'b'
>>> mylist =['a', 'b', 'c']
>>> type (mylist)
<type 'list'>
>>> id(mylist)
11519964
>>> id (mytuple)
8532608
>>> mylist = mytuple
>>> type (mylist)
<type 'string'>
>>> id (mylist)
8532608
>>> 



--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/