Python __eq__ method

Let's take the following example of Student class:

courses1 = ['python', 'java', 'javascript']
courses2 = ['java', 'rails', 'c']

dmitri = Student("dmitri", "telinov", courses1)
dmitri_doubled = Student("dmitri", "telinov", courses2)
Since dmitri and dmitri_doubled have the same first name and last name, you want them to be equal. In other words, you want the following expression to return True:
dmitri == dmitri_doubled
To do it, you can implement the __eq__ dunder method in the Student class.
Python automatically calls the __eq__ method of a class when you use the == operator to compare the instances of the class.
By default, Python uses the is operator if you don’t provide a specific implementation for the __eq__ method.

Implementation - you need to add __eq__ method inside the Student class:
  def __eq__(self, other):
    return self.first_name == other.first_name \
    and self.last_name == other.last_name
So the output of the:
print(dmitri == dmitri_doubled)
will be:
True