I have a dictionary example as:
dictionary = {Bay1: [False,False,True],
Bay2: [True,True,True],
Bay3: [True,True,False],
Bay4: [False,False,False] }
What I'm trying to do is to go through the dictionary by checking each bay (Bay1, Bay2...) to see which one has an array where everything inside it is False
. For that example, I want it to return 'Bay4'
.
Secondly, I want to be able to check to see which is False
and which is True
in each bay by using loops. In other words, you can imagine that True
represents being 'Booked' and False
represents being free or 'Not booked'. I want to be able to check that for each bay and present it to the user in a good and easily readable format.