is it possible that you are mixing whitespace and tabs?
this would make the code look correct, but as python recognizes the difference between tabs and whitespace, this causes indentation errors.
to see what is going on, under the "view" menu, switch "whitespace" on.
|