The Python Comparison Operators : Comparison Operators « Operator « Python Tutorial

Home
Python Tutorial
1.Introduction
2.Data Type
3.Statement
4.Operator
5.String
6.Tuple
7.List
8.Dictionary
9.Collections
10.Function
11.Class
12.File
13.Buildin Function
14.Buildin Module
15.Database
16.Regular Expressions
17.Thread
18.Tkinker
19.wxPython
20.XML
21.Network
22.CGI Web
23.Windows
Python Tutorial » Operator » Comparison Operators 




Expression       Description 

x == y           x equals y.
x < y            x is less than y.
x > y            x is greater than y.
x >= y           x is greater than or equal to y.
x <= y           x is less than or equal to y.
x != y           x is not equal to y.
x is y           x and y are the same object.
x is not y       x and y are different objects.
x in y           x is a member of the container (e.g., sequencey.
x not in y       x is not a member of the container (e.g., sequencey.














4.4.Comparison Operators
4.4.1.The Python Comparison Operators
4.4.2.Standard Type Value Comparison Operators
4.4.3.multiple comparisons can be made on the same line, evaluated in left-to-right order:
4.4.4.standard comparison operators return a Boolean value indicating the truthfulness of the expression
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.