Python 3 Script to Find Length of List Using Len() Method Full Example For Beginners

Python 3 Script to Find Length of List Using Len() Method Full Example For Beginners

 

Welcome folks today in this post we will be finding out the length of list using len() method in python. All the full source code of application is shown below.

 

 

Get Started

 

 

In order to get started we need to create an app.py file and copy paste the following code

 

app.py

 

# Python program to demonstrate working 
# of len() 
a = [] 
a.append("Hello") 
a.append("Geeks") 
a.append("For") 
a.append("Geeks") 
print("The length of list is: ", len(a))

 

See also  Python 3 Script to Find Armstrong Number in an Interval Using While Loop Full Tutorial For Beginners

 

Now if you execute the above script by typing the below command as shown below

 

python app.py

 

 

Leave a Reply