Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then this is how it is, but it's easier to just check the presence of the product in the list
shop = ['all', 'prod']
prod = input()
box.append(shop.pop(shop.index(prod)))
something like this
index = int(input())
box.append(shop.pop(index ))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question