While Loop And If Statement Python Syntax