Lecture Note
University
American Baptist CollegeCourse
CSCI 1534 | Data Analysis and VisualizationPages
1
Academic year
2023
Muthia Marhamah
Views
0
p {margin: 0; padding: 0;} .ft00{font-size:18px;font-family:NimbusRomanRegular;color:#000000;} .ft01{font-size:18px;font-family:NimbusRomanBold;color:#000000;} .ft02{font-size:18px;line-height:21px;font-family:NimbusRomanRegular;color:#000000;} Python Data Operator Logical Operators Logical operators are used on conditional statements (either True or False). They perform Logical AND, logical OR, and Logical Not operators. This operator supports short-circuit evaluation, which mean that if the first argument is False the second is never evaluated. Code example : X = 2 Y = 1 IF X > 2 and Y<1: Print(True) Else: Print(False) Operator Example Same As And Logical AND: True if boththe operands are true X and Y Or Logical OR: True if eitherof the operands is true X or Y Not Logical NOT: True ifoperand is false. Not X
Python Data Operator (Logical Operators)
Please or to post comments