Source Code:
(back to article)
# Initialize the list my_list = [1, 2, 3, 4, 5] # Remove the element at index 2 (which is 3) del my_list[2] # Print the list print(my_list) # [1, 2, 4, 5]
Result:
Report an issue