diff --git a/README.md b/README.md
index e5e8e9b..4dace9f 100644
--- a/README.md
+++ b/README.md
@@ -8370,6 +8370,26 @@ a = f()
You wrote a class to represent a car. How would you compare two cars instances if two cars are equal if they have the same model and color?
+
+```
+class Car:
+ def __init__(self, model, color):
+ self.model = model
+ self.color = color
+
+ def __eq__(self, other):
+ if not isinstance(other, Car):
+ return NotImplemented
+ return self.model == other.model and self.color == other.color
+
+>> a = Car('model_1', 'red')
+>> b = Car('model_2', 'green')
+>> c = Car('model_1', 'red')
+>> a == b
+False
+>> a == c
+True
+```