Created
November 5, 2014 12:57
-
-
Save andbroby/f1608b4377ab0fd26ae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cheeses={'cheddar':('A235-4','A236-1','A236-2','A236-3','A236-5','C31-1','C31-2'),'mozarella':('Q456-9','Q456-8','A234-5','Q457-1','Q457-2'),'gombost':('ZLAFS55-4','ZLAFS55-9','GOMBOS-7','A236-4'),'geitost':('SPAZ-1','SPAZ-3','EMACS45-0'),'portsalut':('B15-1','B15-2','B15-3','B15-4','B16-1','B16-2','B16-4'),'camembert':('A243-1','A234-2','A234-3','A234-4','A235-1','A235-2','A235-3'),'ridder':('GOMBOS-4','B16-3'),} | |
for item in cheeses.items(): | |
infected = ["A234","A235", "B13", "B14", "B15", "C31"] | |
for shelves in item[1:]: | |
if any(infected_shelf in shelf for infected_shelf in infected for shelf in shelves): | |
print(item[0]) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment