Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def checkio(line):
- 'Calculate amount of words which contain exactly two "o" letters'
- result = 0
- alist = line.split()
- for words in alist:
- if 'oo' in words:
- result += 1
- return result
- if __name__ == '__main__':
- assert checkio('voodo google soon color job') == 3, 'First'
- print('All ok')
- #By ephexeve.blogspot.com
Add Comment
Please, Sign In to add comment