operator — Standard operators as functions
The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python.
Functions
operator.absoperator.addoperator.and_operator.concatoperator.containsoperator.countOfoperator.delitemoperator.divoperator.divmodoperator.eqoperator.floordivoperator.geoperator.getitemoperator.gtoperator.indexoperator.indexOfoperator.invoperator.invertoperator.is_operator.is_notoperator.leoperator.lshiftoperator.ltoperator.modoperator.muloperator.neoperator.negoperator.not_operator.or_operator.posoperator.powoperator.rshiftoperator.setitemoperator.suboperator.truedivoperator.truthoperator.xor
For more information on how to use those functions, please check Python's official documentation at operator module - docs.python.org.
Example
import operator
print operator.lt(1, 2)
# True
print operator.truth(0)
# False
print operator.truth([])
# False
print operator.truth(2)
# True
print operator.countOf("hello world", "l")
# 3