type
returns
method
number
name
description
needle
string
The substring to search for
Returns the amount of times the given substring (needle) appears within the string.
"Hello".count('l') == 2 "".count("I'm not in the string") == 0
Last updated 5 years ago
Was this helpful?