Advertisement
davide1409

count

Nov 24th, 2019
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def count(l,element):
  2. #@param l: list
  3. #@param element: any type
  4. #@return int
  5.   c = 0
  6.   for i in l:
  7.     if i == element:
  8.       c+=1
  9.      
  10.   return c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement