class Employee():
def __init__(self, name, salary=0):
self.name = name
self.salary = salary
def hire(self):
hired = input('is employee hired? enter yes or no')
if 'yes' in hired:
hiresalary = int(input('enter employee salary'))
self.salary = hiresalary
def fire(self):
fired = input('is employee fired? enter yes or no')
if 'yes' in fired:
employeelist.remove(self.name)
if 'no':
pass
def raise_salary(self):
input("do you want to raise {}'s salary, enter yes or no".format(self.name))
if 'yes':
raise_sum = int(input("by how much do you want to raise {} salary?".format(self.name)))
self.salary += raise_sum
if 'no':
pass
I want to know if there's a way that every instance of the class will be stored in a list so that if i call the fire method i can delete that instance from the list.