All the functions you need in one place.
Python is my favorite language because it is so powerful and elegant. Yet I find myself often Googling common Python functions. So, I created this post as a quick reference for all essential functions I use most frequently.
Disclaimer: I wrote this post as a self-reference. Please refer to the official Python documentation if you have any doubts. I am not responsible for any bug in your code. (:
append(x) — add to end
extend(iterable) — iterable can be another list, set or tuple etc.
insert(i, x) — add at index i
Copying a list in Python might be trickier than you think. There are 3 ways you can do it: simply using the assignment operator (=), making a shallow copy and making a deep copy. In this article, I will explain what each operation does and how they are different.