diff python/utils.py @ 456:825e5d49325d

slight update
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 19 Feb 2014 16:30:45 -0500
parents abe0b2347d4c
children 30b3455978d9
line wrap: on
line diff
--- a/python/utils.py	Tue Feb 18 14:52:49 2014 -0500
+++ b/python/utils.py	Wed Feb 19 16:30:45 2014 -0500
@@ -273,7 +273,9 @@
 #########################
 
 def mostCommon(L):
-    '''Returns the most frequent element in a iterable'''
+    '''Returns the most frequent element in a iterable
+
+    taken from http://stackoverflow.com/questions/1518522/python-most-common-element-in-a-list'''
     from itertools import groupby
     from operator import itemgetter
     # get an iterable of (item, iterable) pairs