How can I delete the last value I appended to a list in python? For example, if a list is [1, 2, 3, 4, 5], I want to only delete the 5 but instead of saying list.remove(5) I want to say delete the last value I added to the list. This way I'll be able to delete the values according to the order, not what the actual value is.
I think I have to put whatever 'lastly appended value' in the parenthesis in list.remove(), but I don't know what to call the lastly appended value :(