Source Code:
(back to article)
my_list = [1, 2, 3, 1, 2, 3, 1, 2, 3] item = 1 count = my_list.count(item) print(count) # Output: 3
Result:
Report an issue