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

How to Generate Barcode and QR code For Our Products

 మీ products కి barcode / QR code generate చేయాలంటే OPTION 1: ONLINE (No Coding – Quick) Best for small shops / beginners 👉Free websites: T...