<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_exit(self):
 """ Remove the exit item if necessary. Used to make sure we only remove the exit item, not something else. Returns: bool: True if item needed to be removed, False otherwise. """

        if self.items:
            if self.items[-1] is self.exit_item:
                del self.items[-1]
                return True
        return False