object-composition

A confusing object composition python code

A confusing object composition python code Question: Currently, I am on an online crash course on python and I encountered a confusing code. As shown below, it is a code that is designed to find out the number of cotton polo shirts. class Clothing: stock={ ‘name’: [],’material’ :[], ‘amount’:[]} def __init__(self,name): material = “” self.name …

Total answers: 5