Spocoman

04. Sum Of A Beach

Jan 15th, 2022 (edited)
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. string = input().lower()
  2.  
  3. words = ['sand', 'water', 'fish', 'sun']
  4. counter = 0
  5.  
  6. while len(words) > 0:
  7.     counter += string.count(words.pop(0))
  8.  
  9. print(counter)
  10.  
  11.  
  12.  
Add Comment
Please, Sign In to add comment