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.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to