I'm getting IndentationError: unexpected indent even though I wrote the code exactly as shown in the book (Learn Pythhon the hard way)
I'm sure that I'm using exactly four spaces to indent the lines which come after "def".
I am using Python 2.7 on Windows 7.
Here's the error I get in PowerShell:
PS C:\Users\Kiedis\python> python ex25.py
File "ex25.py", line 3
return sorted(words)
^
IndentationError: unexpected indent
And here are the first three lines of my code:
def sort_words(words):
"""Sorts the words"""
return sorted(words)