Conceptual question please.
Would someone discuss the difference between "return" and "print" please. I am still confused how they differ or how those commands interact with a given code.
My confusion came up in UNIT 7 part 4. Removing elements from lists
a) n.pop(index) will remove the item at index from the list and return it to you
b) n.remove(item) will remove the actual item if it finds it:
c) del(n) is like .pop in that it will remove the item at the given index, but it won't return it
If you remove an item from a list what does it mean "n.pop(index)" can return the item to me/you?
If I use "del(n)" how come the item won't be returned?
If I print a list after "n.pop(index)" does that mean I can access the item i removed later (the item can still be returned)?
What am I printing after I use "del(n)"?
Thank you for your time!