In step 13 of the Veneer project I try to print the listings with print(veneer.show_listings())
I did everything exactly as stated in the walkthrough video, but I get an AttributeError.
This is the class and the print statement:
class Marketplace:
def int(self):
self.listings =
def add_listing(self, new_listing):
self.listing.append(new_listing)
def remove_listings(self, expired_listing):
self.listing.remove(expired_listing)
def show_listings(self):
for listing in self.listings:
print(listing)
veneer = Marketplace()
print(veneer.show_listings())
And this is the error message I received:
Traceback (most recent call last):
File “script.py”, line 26, in
print(veneer.show_listings())
File “script.py”, line 22, in show_listings
for listing in self.listings:
AttributeError: ‘Marketplace’ object has no attribute ‘listings’
Can someone please tell me whats wrong about it? Thanks