Member-only story
Epacris — The List Methods in Python
A new acronym to remember Python list methods.

Epacris is actually a word and it defines a genus of about forty species of flowering plants in the family Ericaceae.¹
What’s that got to do with Python Lists? Well if you look closely, the acronym EPACRIS covers all the list methods. I often find it annoying to look up the list methods and found a way to remember them all. Let’s start.
E — extend()
As the name suggests, we can add more elements to the end of an existing list.
Example:
P — pop()
Remove elements from specified position.
Example:

A — append()
Add elements to the end of the list. Notice below the difference between extend and append.
Example:

C — clear(),copy(),count()
clear() — removes all the elements from a list
copy() — makes a copy of the original list. What’s the advantage? See the below example, when we make changes to LM then LM3 also changes but LM2 doesn’t.
count() — counting the occurrence of an element in a list.
Example:

R — remove(),reverse()
remove()- removes the first occurrence of an element from the list
reverse()- reverse the elements of a list
Example:

I — index(), insert()