Api Development In Python If Else Statement Syntax