class Coffee:
price = 3000
@classmethod
def set_price(cls, new_price):
cls.price = new_price
coffee1 = Coffee()
coffee2 = Coffee()
print(coffee1.price)
print(coffee2.price)
Coffee.set_price(3500)
print(coffee1.price)
print(coffee2.price)
To embed this project on your website, copy the following code and paste it into your website's HTML: