user721588
user721588

Reputation:

huffman algorithm in python

HI!

Could anybody say how to fix the problem in the Huffman algorthm (if put together all the parts) from this Internet site:

http://www.builderau.com.au/program/python/soa/Huffman-coding-in-Python/0,2000064084,339283616,00.htm

Error:

 itemqueue =  [Node(a, len(list(b))) for a, b in groupby(sorted(input))]
TypeError: 'builtin_function_or_method' object is not iterable

Thanks!

Upvotes: 2

Views: 1475

Answers (1)

log0
log0

Reputation: 10917

I think you forgot to declare input. It should work fine otherwise.

Upvotes: 4

Related Questions