What is the difference between remove and del ? I read that remove deletes the first occurrence, while del removes the item at a specified index, but I tried to use index with remove and it worked so, what's the actual difference and the actual use???
>>> list=[1,2,3,4]
... list.remove(list[0])
... print(list)
[2, 3, 4]
>>> list=[1,2,3,4]
... list.remove(1)
... print(list)
[2, 3, 4]
>>> list=[1,2,3,4]
... del(list[0])
... print(list)
[2, 3, 4]