pacho_the_python

Untitled

Feb 12th, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. text = input().lower()
  2.  
  3. beach = ["sand", "water", "fish", "sun"]
  4.  
  5. counter = 0
  6.  
  7. for item in beach:
  8.     if item in text:
  9.         word_number = text.count(item)
  10.         counter += word_number
  11.  
  12. print(counter)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment