Passing objects to functions works the same way as assigning them. So, what you're seeing is the same effect as this:
>>> words = ["A", "list", "of", "words"]
>>> stuff = words
>>> stuff.pop()
'words'
>>> words
['A', 'list', 'of']
This happens because stuff and words are the same list, and pop changes that list. ints are immutable, meaning they don't support any in-place mutations: every time you change its value, it gives you a different int object with the new value. You can test whether two objects are the same or distinct objects using the is operator:
>>> stuff is words
True
>>> a = 5
>>> b = a
>>> a is b
True
>>> b += 1
>>> a is b
False