“Value Count a List Python” Respostas de código

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})
sandy_codes_py

Coure itens de número de contagem na lista python

mylist = ["abc", "def", "ghi", "jkl", "mno", "pqr"]

print(len(mylist))

# output 6
Mardax

Respostas semelhantes a “Value Count a List Python”

Perguntas semelhantes a “Value Count a List Python”

Procure respostas de código populares por idioma

Procurar outros idiomas de código