Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

.counter python

import collections

number = [0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1]
collections.Counter(number)

#output
#Counter({0: 12, 1: 9})
Source by gto76.github.io #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
2+8 =