Ltc Hotspot ltc.hotspot at
Wed Aug 12 02:01:24 CEST 2015

Hi Everyone,

What is the list equivalent to line 12: ncount.sort(reverse=True)

count = dict()
fname = raw_input("Enter file name: ")#
handle = open (fname, 'r')#
for line in handle: 
    if line.startswith("From "):
        address = line.split()[5] 
        line = line.rstrip()
        count[address] = count.get(address, 0) + 1 

for key,val in count.items():
    ncount = (key,val)
    print key,val

Error message, reads: AttributeError, line 12, below : 'tuple' object has no attribute 'sort'

Raw data code, available at
Embedded data code, available at
Visualization URL link, available at


More information about the Python-list mailing list