Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. #Count how many times item is found in sequence
  2.  
  3. def count(sequence,item):
  4.     count_sequence = 0
  5.    
  6.     for i in sequence:
  7.         if sequence[i] == item:
  8.             count_sequence += 1
  9.     return count_sequence
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement