Python Syntax Error Unexpected Eof While Parsing For Loop