Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- towary = {
- "cukier": 2,
- "chleb": 4,
- "jajka": 6
- }
- spis = ["cukier", "chleb", "jajka", "warzywa"]
- def sprawdz(spis, towary):
- for x in spis:
- if not czyIstnieje(x,towary):
- print("brak towaru")
- def czyIstnieje(produkt, towary):
- for key, value in towary.items():
- if(produkt == key):
- print(key, " = ", value)
- return True
- return False
- sprawdz(spis, towary)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement