aima/learning.py
def top(self, n):
        "Return (count, obs) tuples for the n most frequent observations."
        return heapq.nlargest(n, [(v, k) for (k, v) in self.dictionary.items()])
def top(self, n):
        "Return (count, obs) tuples for the n most frequent observations."
        return heapq.nlargest(n, [(v, k) for (k, v) in self.dictionary.items()])
def top ( self , n ) : return heapq . nlargest ( n , [ ( v , k ) for ( k , v ) in self . dictionary . items ( ) ] )
Return (count, obs) tuples for the n most frequent observations.
Return ( count obs ) tuples for the n most frequent observations .