Python 2 treats a tab the same way Notepad does - as enough spaces to reach the next 8-space indentation level. This means if you mix tabs and spaces, you might see code that looks perfectly well indented, but Python sees a garbled mess. (In Python 3, Python will give you a helpful TabError: inconsistent use of tabs and spaces in indentation if it sees that you're mixing tabs and spaces.) Your code has a tab on the second line and 4 spaces and a tab on the second. This looks like 1 indent, then 2, but Python doesn't see it that way.
Don't mix tabs and spaces. If you can, use the -tt interpreter option to detect this, and use an editor with an option to display whitespace characters.
.lower()missing parentheses:)), you may addset expandtabin.vimrcfile and it will always insert space instead of tabs.