cf.VariableList.count

VariableList.count(value)[source]

Return the number of occurrences of a given value.

Uses numerically tolerant equality where appropriate.

Parameters :
value :

The value to count.

Returns :
out : int

The number of occurrences of value.

Examples

>>> s
[1, 2, 3, 2, 4, 2]
>>> s.count(1)
1
>>> s.count(2)
3

Previous topic

cf.VariableList.copy

Next topic

cf.VariableList.delprop

This Page