Question d’entretien chez Upvest

How would you design and implement a basic pub-sub (publisher–subscriber) system in Python without using external libraries?