def add_item(self, item_object):
if len(self.inventory) <= self.capacity:
self.inventory.append(item_object)
return True
else:
print("Reached max capacity")
return False
on behalf of DL
Neil via Python-list
*Sent:* Sunday, February 23, 2020 4:41:54 PM
*To:* python-list@
On 22/02/20 10:45 PM, S Y wrote:
How can I use remove,add and verify methods in class oop. Which has tuple with
allowed values inside class. Like two classes cart and inventory
Please show the code you have so-far.
What are you removing, adding, and verifying?
Are you aware of the Python-Tutor