python when to use == and is code example Example: python is The is keyword is used to test if two objects refer to the same object.