Logical Function In Python Definition Instance