Rules for Python Indentation:
- Either always use tab or always use spaces - never mix the two.
- Even better would be to never use tabs, they don't always survive copy/paste.
- Use 4 spaces per indentation level (or 2, or 8) and always be consistent.
The problem with your source (assuming you don't have any tabs - although what you posted doesn't have tabs - your source may since the tabs could have been lost during copy/paste):
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!