Please enable JavaScript to use CodeHS

CodeHS Glossary


count() Python

A method that counts occurrences of specific items in a list. ``` my_list = [1,2,3,2,4] count_twos_in_list = my_list.count(2) ```