Advertisement
davide1409

countDifferent

Dec 19th, 2019
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def countDifferent(vet):
  2. #@param vet: list
  3. #@return int
  4.   different = []
  5.   for i in range(len(vet)):
  6.     if vet[i] not in different:
  7.       different.append(vet[i])
  8.      
  9.   return len(different)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement