How to check the length of the elements in python list object

# How to check the length of the elements in python list object using len() function

Length of a List

In order to find the number of items present in a list, we can use the len() function.

Ex:

list=[20,33,44,55,"ramesh","rani",56.88]

print(len(list))


# print secod index to upto end of the list values using len() function
Ex:

list=[20,33,44,55,"ramesh","rani",56.88]
for x in range(2,len(list)):
    print(list[x])

No comments:

Post a Comment

Latest Post

Don’t Sweat It – Chill with Crompton Air Cooler Deals

 ðŸŒž Don’t Sweat It – Chill with Crompton Air Cooler Deals  More Details : https://www.amazon.in/s?k=laptops+under+70000&crid=29QIFPXQYB3...