How To Find Length Of List in Python ?

Published On: 20/06/2022 | Category: Python

Hi Dev,

Now, let's see article of how to find length of string in list in python. you can understand a concept of how to find length of a list in python. We will look at example of python length of list example. step by step explain how to find size of a list in python. So, let's follow few step to create example of python get length of array.

The len() method to return the length of an array using python.

Here i will simple and easy example of how to get length of list in python. So let's see the below example:

Example : 1
# Python program to find lenth of list
# of len()
n = len([11, 22, 33, 44, 55, 66, 77])
print("The Length of List is: ", n)
Output:
The Length of List is:  7
Example : 2
# Python program to find lenth of list
# of len()
arrList = []
arrList.append("banana")
arrList.append("mango")
arrList.append("orange")
arrList.append("apple")
arrList.append("tuts-station.com")
n = len(arrList)
print("The Length of List is: ", n)
Output:
The Length of List is:  5

I Hope It will help you....