?
What will be the output of the following Python code?
What will be the output of the following Python code?
class fruits:
def __init__(self):
self.price = 100
self.__bags = 5
def display(self):
print(self.__bags)
obj=fruits()
obj.display()
class fruits:
def __init__(self):
self.price = 100
self.__bags = 5
def display(self):
print(self.__bags)
obj=fruits()
obj.display()
Join the Discussion
Login to post a comment or share your explanation.
Login