Logical Function In Python Example