 In Python , = = compares by value , versus Java , which compares <unk> by value and objects by reference . ( Value comparisons in Java on objects can be performed with the equals ( ) method . ) Python 's is operator may be used to compare object identities ( comparison by reference ) . In Python , comparisons may be chained , for example a < = b < 
