'str' object does not support item assignment
Mark Lawrence
breamoreboy at yahoo.co.uk
Sun Sep 23 15:11:05 EDT 2012
More information about the Python-list mailing list
Sun Sep 23 15:11:05 EDT 2012
- Previous message (by thread): 'str' object does not support item assignment
- Next message (by thread): List Problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 23/09/2012 19:31, jimbo1qaz wrote: > spots[y][x]=mark fails with a "'str' object does not support item assignment" error,even though: >>>> a=[["a"]] >>>> a[0][0]="b" > and: >>>> a=[["a"]] >>>> a[0][0]=1000000 > both work. > Spots is a nested list created as a copy of another list. > Looks to me as if there are three options. a) raise a bug report on the Python bug tracker at bugs.python.org. b) fix your code. As option b) is the likely route, the way forward is to put print statements in your code so you can see what data you have *AND* what type it is. -- Cheers. Mark Lawrence.
- Previous message (by thread): 'str' object does not support item assignment
- Next message (by thread): List Problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list