invalid syntax error in if statement python