zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Python Comparison Operators

August 28, 2010 by Igor Drobot Leave a Comment

All following comparison operators have the standard mathematical interpretation and return a boolean value of True for true, False for false:

Comparison operations are supported by all objects!

This table summarizes the comparison operations:

Operation Meaning
< strictly less than
<= less than or equal
> strictly greater than
>= greater than or equal
== equal
!= not equal*
is object identity
is not negated object identity

* != can also be written <>, but this is an obsolete usage kept for backwards compatibility only. New code should always use !=.

Filed Under: Linux Tagged With: Programming, Python

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok