Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def count_hi(str):
- count = 0
- for i in range(0, len(str)-1):
- if str[i] == 'h' and str[(i+1)] == 'i':
- count = count + 1
- return count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement