I have a dictionary called Basket #of fruit. For reasons, Basket looks like this..
Basket = {
Fruit1 : "none"
Fruit2 : "none"
Fruit3 : "none"
Fruit4 : "none"
Fruit5 : "none"
}
I'd like to check if Apple is in this dictionary, and if it is not- to enter it as Fruit1. But lets say the Basket has been accessed already somehow and Banana has already been set as Fruit1, then I'd like Apple to be set as Fruit2 instead, but if Pear is already in there than it should be Fruit3 and so on. My overall code is... not the best, but at this point this is the way it must work if it is to work, so short of scrapping what is in place already (I hope to revise it all later) how can I make this work?
At the moment the rest of the code simply checks if Fruit1 == Apple and if not moves on to compare Fruit2 etc, if it finds a match then it does stuff but if there is no Apple already in Basket then Apple will never be added, and all keys in the Basket are initially set to "none". I've perplexadoxed myself. Any advise appreciated!