Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. # Duplicate checker/counter
  2.  
  3.  
  4. # IDList en countList moeten globale variabelen worden
  5.  
  6.  
  7. def dup(read, IDList, countList):
  8.     ID = read[0]
  9.     # countList = []
  10.     # IDList = []
  11.     if ID in IDList:
  12.         countList[IDList.index(ID)] += 1
  13.     else:
  14.         IDList.append(ID)
  15.         countList.append(1)
  16.     return IDList, countList
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement