#Write a function countTriGrams(s,trigram) that takes #two strings as parameters. #The second string is of length 3. #The function should count the number of (possibly overlapping) #occurrences of the string trigram within s. #For example, countTriGrams("mississippi", "iss") should return 2. def countTriGrams(s, trigram): count = 0 for i in range(len(s)-2): if s[i:i+3] == trigram: count += 1 return count