featured Image

How to split a list into multiple list using python

In this post, we will learn how to split a list into multiple lists of N chunks in Python. Python provides a simple way to split a list into multiple…

Read more
featured Image

Get the Index or Position of Item in List in Python

To find the index of an element from List in python, we can use the index() method and pass the element as an argument. It returns the index of the…

Read more
featured Image

Remove Duplicates from List in Python

In this article, we will discuss different ways to remove duplicate items from a Python List with some examples. What is Python List? A list is one of the built-in…

Read more
featured Image

Remove the Last N element from a List in Python

In this post, we will learn about different ways to remove last n element from a list in python. In python, a list is a data type in which we…

Read more
featured Image

Python – Insert an element at specific index in a list

In this article, we will learn about how to insert an element at a specific index in a list in python. A list in python can store multiple values in…

Read more
featured Image

Python – Check if list is empty or not

In this article, we will learn different ways to check if a list is empty or not in python. Python list is an order sequence that can hold multiple object…

Read more
featured Image

Sort List or Dictionary by two keys in Python

In this article, we will learn how to sort a list or dictionary using multiple keys in Python. Sorting a list or dictionary can be easily done using the sort()…

Read more
featured Image

Prepend List in Python (Append at the beginning)

In this article, we will learn how to prepend items in a list in Python. Python has an in-built method called append() to append (add at the end) items to…

Read more
featured Image

How to flatten nested list in python (5 ways)

A list in python is one of the most flexible data types. It can have multiple dimensions i.e it can contain lists inside a list. It is known as the…

Read more