- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Python Logical Operators
There are following logical operators supported by Python language. Assume variable a holds 10 and variable b holds 20 then −
|Sr.No||Operator & Description||Example|
|1||and Logical AND|
If both the operands are true then condition becomes true.
|(a and b) is true.|
|2||or Logical OR|
If any of the two operands are non-zero then condition becomes true.
|(a or b) is true.|
|3||not Logical NOT|
Used to reverse the logical state of its operand.
|Not(a and b) is false.|
- Java Logical Operators
- Perl Logical Operators
- Logical Operators on String in Python?
- Logical Operators in C++
- Java Regular expressions Logical operators
- Logical Operators on String in C#
- Relational and Logical Operators in C
- Logical Operators on String in Java
- Explain the logical operators in DBMS
- What are the logical operators in C#?
- What are the logical operators in Java?
- Written version of Logical operators in C++
- How can we use logical operators while creating MySQL views?