>>> for i in 5:
... print i
Traceback (innermost last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
I don't know about you, but I sometimes type verbosely into my IDLE prompt. This confuses both myself and mycomputer.
>>> Remember the beans. SyntaxError: invalid syntax >>> What the? SyntaxError: invalid syntax >>> i = hungry Traceback (most recent call last): File "<pyshell#18>", line 1, in <module> i = hungry NameError: name 'hungry' is not defined
OOOOH, now I understand. I am not making sense. Thankfully Python is Frank and Frankely points out my error.
After eating, I can quickly restore my confidence by talking to Python how Python expects, no exceptions.
>>> "Recuerdo los frijoles" 'Recuerdo los frijoles'
No matter how long we have been programming, we will still be prone to errors. Errors are the lifeblood of lifelong learning.
Try and see what errors you can produce. Post your error results below.
But I think 'Debugging' does not fit this task, 'Errors and Exceptions' may fit better.
http://docs.python.org/py3k/tutorial/errors.html is a good documentation about this topic and the list of built-in exceptions (http://docs.python.org/py3k/library/exceptions.html) may help, too.