The post Get Length of the List using Python len() function appeared first on positronX.io.
Hello folks, today we are going to learn how to get the length of a list using Python len() function. Python is the most popular programming language these days, and it offers a built-in function to calculate the size of the data in a list, array, tuple etc.
We are going to explore the Python len()
function, this function takes a data object as a parameter and returns the number of items in a data list. Here, the important thing is to remember is if you pass a string as a parameter, then the len() method will return the number of the characters of the string.
Top comments (0)