As Adam pointed out, reading from an array of strings is possible in Python using indexing syntax. Impossible, although written in a string using this syntax:
>>> s = 'bar'
>>> s[2] = 'z'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'str' object does not support item assignment
Perhaps this was the problem you encountered?
source
share