Pranshu Mittal3,585 Points
When using inventory[:] instead of inventory.copy() same result is obtained. Why?
i tried using inventory[:] or inventory[0:] while removing all the elements of the list and the result obtained is  similar to that of inventory.copy() even though python is not creating another object. So why is the giving the exact same result?
Steven Parker182,603 Points
A slice does create another object, and one with no arguments does exactly the same thing as the "copy" method.