Why does this work...
ASET = {}
ASET["X"] = "HELLO"
print(ASET)
But this not work...
ASET = []
ASET[0] = "HELLO"
print(ASET)
The first will result in:
{'X': 'HELLO'}
The second will generate the error:
IndexError Traceback (most recent call last)
<ipython-input-45-c521155a114d> in <module>
1 ASET = []
----> 2 ASET[0] = "HELLO"
3 print(ASET)
IndexError: list assignment index out of range