The following code example demonstrates an example of Using Logical Operators in Python.
# programmingempire.com
a = 567
b = 932
c ="Joe"
print(a and True and a)
print(a or True or False)
print(b or False or False)
print(c or True or False)
print(b and False and False)
print(a and b and c)
print(not a)
print(a or b or c)
Output
![](https://www.programmingempire.com/wp-content/uploads/2023/01/image-14.png)
Further Reading
Examples of OpenCV Library in Python
A Brief Introduction of Pandas Library in Python
A Brief Tutorial on NumPy in Python
- Angular
- ASP.NET
- C
- C#
- C++
- CSS
- Dot Net Framework
- HTML
- IoT
- Java
- JavaScript
- Kotlin
- PHP
- Power Bi
- Python
- Scratch 3.0
- TypeScript
- VB.NET
![programmingempire](https://www.programmingempire.com/wp-content/uploads/2021/10/pefavicon.png)