Run
class Laptop: name = 'My Laptop' processor = 'Intel Core' @staticmethod def start(): print('Laptop is starting..') @staticmethod def restart(self): print('Laptop is restarting') def details(self): print('My laptop name is:', self.name) print('It has',self.processor,'processor.') #create object laptop1 = Laptop() laptop1.name = 'Dell Alienware' laptop1.processor = 'Intel Core i7' laptop1.details()
Output