I'm trying to set the index of an array in Python, but it isn't acting as expected:
theThing = []
theThing[0] = 0
'''Set theThing[0] to 0'''
This produces the following error:
Traceback (most recent call last):
File "prog.py", line 2, in <module>
theThing[0] = 0;
IndexError: list assignment index out of range
What would be the correct syntax for setting an index of an array in Python?