why?

sami sieranoja sami.sieranoja at pp.inet.fi
Mon Dec 2 17:35:35 EST 2002


Hi!

Why does this happen:

>>> doing = ['a','b','c']
>>> doing[1] = ('b','c')
>>> doing[1][0]
'b'
>>> doing[1][0] = 'i'
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: object doesn't support item assignment
>>>

Why can't I change that value from 'b' to 'i' ?  Why?


-Sami



More information about the Python-list mailing list