<In what way does your code behave incorrectly? Include ALL error messages.>
Its not about the code. The difference between pop and del command is that pop returns the value. I have heard we can return value only in functions. How is the returned value using pop command used? how to call that value?
n = [1, 3, 5] n.pop(1) # Returns 3 (the item at index 1) print n # prints [1, 5]