class Employee: def __init__(self, first, last, pay): self.first = first self.last = last self.email = first + '.' + last + '@email.com' self.pay = pay def fullname(self): return '{} {}'.format(self.first, self.last) @classmethod def from_string(cls, emp_str): first, last, pay = emp_str.split('-') return cls(first, last, pay) @staticmethod def is_workday(day): return not day == 7 # emp_1 = Employee('Masoud', 'Sadrnezhaad', 5000) emp_1 = Employee.from_string('Masoud-Sadrnezhaad-5000') print(Employee.is_workday(7))