How do I do this without string.count()
, because it is listed as deprecated in Python v2.7.3 documentation?
I am unable to find what I should use instead.
EDIT: The question originally stated that str.count()
was deprecated but that is incorrect and misleading. See https://stackoverflow.com/a/10385996/966508 for explanation