sibinasto

PF - Basic Syntax - More Exercise - 3.04. Sum of a Beach

Jan 16th, 2021
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. word_snake = input()
  2.  
  3. word_matches = ["water", "sand", "sun", "fish"]
  4. match = 0
  5.  
  6. for i in range(len(word_matches)):
  7.     match += word_snake.lower().count(word_matches[i])
  8.  
  9. print(match)
Advertisement
Add Comment
Please, Sign In to add comment