Categories
Error in Python, what to do?
An error:
AttributeError: 'dict' object has no attribute 'remove'
def delete_product(user_group, shop = shop, **products): if user_group in shop: shop[user_group].remove(products)
Answer the question
In order to leave comments, you need to log in
Dictionaries have no such method. Use one of the following options:
dict.pop() del dict[key]
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question