class Room(object):
    def __init__(self, room_name, room_type, max_persons):
        self.room_name = room_name
        self.room_type = room_type
        self.max_persons = max_persons
        self.persons = []

    def add_occupant(self, person):
        if person not in self.persons:
            if len(self.persons) < self.max_persons:
                self.persons.append(person)
                print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
            else:
                raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")
        else:
            raise Exception(person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " is already among the occupants in " + self.room_type + " " + self.room_name.title())

class Room(object):
    def __init__(self, room_name, room_type, max_persons):
        self.room_name = room_name
        self.room_type = room_type
        self.max_persons = max_persons
        self.persons = []

    def add_occupant(self, person):
        if len(self.persons) < self.max_persons:
            self.persons.append(person)
            print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
        else:
            raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")

--- 
+++ 
@@ -6,8 +6,11 @@
         self.persons = []
 
     def add_occupant(self, person):
-        if len(self.persons) < self.max_persons:
-            self.persons.append(person)
-            print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
+        if person not in self.persons:
+            if len(self.persons) < self.max_persons:
+                self.persons.append(person)
+                print (person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " has been allocated " + self.room_type + " " + self.room_name.title())
+            else:
+                raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")
         else:
-            raise Exception(self.room_type.title() + " " + self.room_name.title() + " is at full capacity")
+            raise Exception(person.person_type.title() + " " + person.person_name.title() + " " + person.person_surname.title() + " is already among the occupants in " + self.room_type + " " + self.room_name.title())
Modify add_occupant method to raise exception in case of a duplicate
