Changing variable to integer

Fredrik Lundh fredrik at pythonware.com
Sun Dec 17 09:23:23 EST 2006


vertigo wrote:

> I receive such error:
> File "p4.py", line 24, in PrintWordCountFloat
>      print "%s %f" % (word,words[word])
> TypeError: list indices must be integers

please post the *entire* traceback message.  see:

http://effbot.org/pyfaq/tutor-i-need-help-im-getting-an-error-in-my-program-what-should-i-do

</F>




More information about the Python-list mailing list