How To Use Type Function In Condition Python