return the number of times that the string "hi" appears anywhere in the given string python code example
Example: Return the number of times that the string "hi" appears anywhere in the given string. python
def count_hi(str):
return str.count("hi")