Api Development In Python Using And In If Statement