search_string : String to be searched for matching inside main string.
start: Optional , search can be started from this position
end : Optional , search can be ended from this position.
my_str="Welcome to"
print(my_str.count('co'))      # Output is 2
print(my_str.count('co',4))    # Output is 1 
print(my_str.count('co',4,18)) # Output is 0
Using a list
print(my_list.count('two'))      # Output is 1

All String methods

Post your comments , suggestion , error , requirements etc here

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 All rights reserved worldwide Privacy Policy Disclaimer