Write Syntax For Nested If Function Python