Answers for "count item in list of list python"

2

value count a list python

from collections import Counter
z = ['blue', 'red', 'blue', 'yellow', 'blue', 'red']
Counter(z)
>>> Counter({'blue': 3, 'red': 2, 'yellow': 1})
Posted by: Guest on October-26-2021
0

List Count Elements

a = ["more", 4, 6]
print(len(a))
# prints 3
Posted by: Guest on December-10-2021

Code answers related to "count item in list of list python"

Python Answers by Framework

Browse Popular Code Answers by Language