numbers = []
numbers[0] = 1IndexError: list assignment index out of range
numbers = []
numbers.append(1)
print(numbers)Tried to assign to an index that does not exist.
- Related case: https://pyai.io/en/python/basic/lists/
numbers = []
numbers[0] = 1IndexError: list assignment index out of range
numbers = []
numbers.append(1)
print(numbers)Tried to assign to an index that does not exist.