class Hello: def __init__(self): self.name = "World" def sayHello(self, *names): if (len(names) == 0): print("Hello " + self.name) return for name in names: assert isinstance(name, str) print("Hello " + name) def setName(self, newName): assert isinstance(newName, (str, int)) self.name = str(newName) def getName(self): return self.name hello = Hello() hello.setName("EugeneX") hello.sayHello() hello.sayHello("Вася", "Петя")