Get access to the latest news
Receive monthly updates on business process management, software, and Omnitas’ partners.
Sign up to get updates filled with our latest videos, blog articles, and events.
# Example Usage if __name__ == "__main__": manager = CelebrityManager()
class CelebrityManager: def __init__(self): self.celebrities = {}
def add_celebrity(self, name): """Add a celebrity to the system.""" if name not in self.celebrities: self.celebrities[name] = {} # Initialize with an empty dictionary for future expansion print(f"Celebrity '{name}' added successfully.") else: print(f"Celebrity '{name}' already exists.")
def list_celebrities(self): """List all celebrities in the system.""" return list(self.celebrities.keys())
# Listing celebrities print("List of Celebrities:") for celebrity in manager.list_celebrities(): print(celebrity)
# Adding celebrities manager.add_celebrity("Demi Hawks") manager.add_celebrity("Emma Rosie")
def get_celebrity_info(self, name): """Retrieve information about a celebrity.""" if name in self.celebrities: return self.celebrities[name] else: return f"No information found for '{name}'."