2

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!

1 Answers1

4

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

log0
  • 10,489
  • 4
  • 28
  • 62