Python – Count the number of items in a list

In Python, we can use len() to count the number of items in a List


list = ["a", "b", "c"]

print(len(list))

Output


3

References

  1. Pyhton docs – len()

No comments yet. Be the first to leave a comment!

Leave a Comment

Your email address will not be published. Required fields are marked *