invalid syntax python if statement