Edgewall Software

Changes between Version 4 and Version 5 of HelperFunctions


Ignore:
Timestamp:
Aug 18, 2006, 12:14:14 PM (18 years ago)
Author:
Arnar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HelperFunctions

    v4 v5  
    112112#!python
    113113def countoccurrences(numbers, minlength=0):
    114     """Takes a list of integers numbers, in the range of 0..n and returns
    115     a list of integers where i-th item is the number of times i appears in types.
     114    """Takes a list of integers, in the range of 0..n and returns a list of integers
     115    where i-th item is the number of times i appears in the input list.
    116116   
    117117    If minlength is specified and n+1 < minlength, the returned list is