Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)

I'm searching for a simple way to get the count of the number of elements which is present inside a list:

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

I need to get the output as 3. Anyone, please help me with my doubt.

1 Answer

0 votes
by (26.4k points)

You can use len(), to get the count of the list.

>>> someList=["a","b","c"]

>>> print len(someList)

3

Want to become a expert in python? Join python course fast to gain more knowledge in python.

Related questions

0 votes
1 answer
asked Sep 27, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer

Browse Categories

...