Returning items that meet a minimum value I'm trying to find an alternative way to write this code such as using different ways to achieve checking if it's a subset and insertion.     

def candidates(table, candidates, minsupp):
    count, supported = {}, {}
    for item in table:
        for c in candidates:
            if c.issubset(item): 
                count[c] =  count.get(c, 0) 
                count[c] = count[c] + 1 

    total = float(len(table))
    l_sub_one = []
    for c in count:
        support = count[c] / total 
        if support &gt;= minsupp:
            l_sub_one.insert(0, c)
        supported[c] = support
    return l_sub_one, supported
As @Alan suggested in his comment, this method is doing 2 different things that can be separated into 2 methods.

This looks strange:


            count[c] =  count.get(c, 0) 
            count[c] = count[c] + 1



Why not:

            count[c] = count.get(c, 0) + 1