Doubt regarding python Oops concept

Hiii @royalkumar2516 ,
You asked question related to your food ordering app, and your doubt was why you are getting address of object, let me show the code you have written :-
food=admin()
food.add_detail()
my_food.append(food)
print(my_food)
here if you see, you have create an object (food) of admin class, this object contains the memory address of this class, and when you try append it’s content to my_food and print it (print(my_food)) it gives you the memory location. so just remove this lines of code from your program.

2 Likes