I don't understand why i getting None in output of this code ?
class mobile:
def __init__(self, name, brand):
self.name = name
self.brand = brand
# def get_name(self):
# return self.name
class cpu(mobile):
def get_name(self):
print(self.name)
brand = cpu("Intel","Sony")
print(brand.get_name())
The output is :
Intel
None