Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def getNumberOfOcurrences(self, token, array):
  2. numberOfOcurrences = 0
  3. for element in array:
  4. if element == token:
  5. numberOfOcurrences = numberOfOcurrences + 1
  6. return numberOfOcurrences
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement