Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

Does anyone know why Python's list.append function is not called list.push given that there's already a list.pop that removes and returns the last element (that indexed at -1) and list.append semantic is consistent with that use?

1 Answer

0 votes
by (106k points)

The pop() method appends an element to a list. Whereas Push is usually used when referring to stacks.

Browse Categories

...