class Mobile: def __init__(self): self.__maxprice = 1000 def sell(self): print('Nokia Selling Price: {}'.format(self.__maxprice)) def setMaxPrice(self, price): self.__maxprice = price obj = Mobile() obj.sell() obj.__maxprice = 1100 obj.sell() obj.setMaxPrice(1100) obj.sell()