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. (:


  • list.append(x) — add to end
  • list.extend(iterable) — iterable can be another list, set or tuple etc.
  • list.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.

Thawsitt Naing

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store