My code works, but not as I want
Is it possible to make my code looks without double ceo or emp???
I use python 3.5
class Employee(object): def __init__(self, name, surname): self.name = name self.surname=surname def greet(self, other, other1): print ("Hello, %s %s" %(other.name, other.surname)) class Ceo(Employee): def greet(self,other, other1 ): print ("Get back to work %s, %s" %(other.name, other1.surname)) ceo=Ceo("Katya", "Sobaka") emp=Employee("Yan", "Makouski") emp.greet(ceo,ceo), ceo.greet(emp,emp)
That would be printed in the shell:
Hello, Katya Sobaka
Get back to work Yan, Makouski