Title: Logical Operations
Slug: logical_operations
Summary: Logical Operations
Date: 2016-05-01 12:00
Category: Python
Tags: Basics
Authors: Chris Albon
In [1]:
x = 6
In [2]:
y = 9
In [3]:
z = 12
In [4]:
x or y
Out[4]:
In [5]:
x and y
Out[5]:
In [6]:
not x
Out[6]:
In [7]:
x == y
Out[7]:
In [8]:
x != y
Out[8]:
In [9]:
1 < 2
Out[9]:
In [10]:
2 <= 4
Out[10]:
In [11]:
3 == 5
Out[11]:
In [12]:
3 != 4
Out[12]:
In [13]:
x < y < z
Out[13]:
In [14]:
x < y and y < z
Out[14]: