Using Ternary Operator In Python