correct syntax for if statement in python