ilnur, itemgetter - твой друг, не надо так делать
lsums = sorted(sums.items(), key=operator.itemgetter(1))