The reason for single responsibility is having a centralized place to change code. Your class or module must not contain multiple tasks or jobs. It's a way to have clean code.
# Class for baking breadclassBreadBaker:defbakeBread(self):print("Baking high-quality bread...")# Class for managing inventoryclassInventoryManager:defmanageInventory(self):print("Managing inventory...")# Class for ordering suppliesclassSupplyOrder:deforderSupplies(self):print("Ordering supplies...")# Class for serving customersclassCustomerService:defserveCustomer(self):print("Serving customers...")# Class for cleaning the bakeryclassBakeryCleaner:defcleanBakery(self):print("Cleaning the bakery...")defmain():baker=BreadBaker()inventoryManager=InventoryManager()supplyOrder=SupplyOrder()customerService=CustomerService()cleaner=BakeryCleaner()# Each class focuses on its specific responsibilitybaker.bakeBread()inventoryManager.manageInventory()supplyOrder.orderSupplies()customerService.serveCustomer()cleaner.cleanBakery()if__name__=="__main__":main()