Mega Code Archive

 
Categories / Python Tutorial / Operator
 

Standard Type Value Comparison Operators

print 2 == 2 print 2.46 <= 8.33 print 5+4j >= 2-3j print 'abc' == 'xyz' print 'abc' > 'xyz' print 'abc' < 'xyz' print [3, 'abc'] == ['abc', 3] print [3, 'abc'] == [3, 'abc']