Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = {'First Thing': {'ItemID':'0010152', 'Name': 'iPhone Black Cover', 'Category': 'Accessories','Price':610,'Count':56}, 'Second Thing': {'ItemID':'0011181' , 'Name': 'Burger', 'Category': 'Food & Drink','Price':349,'Count':70}, 'Third Thing': {'ItemID':'3520364' , 'Name': 'Engineering Geology 12th Edition', 'Category': 'Books','Price':499,'Count':45}, 'Fourth Thing': {'ItemID':'1256219' , 'Name': 'Call of Duty:Infinite Warfare', 'Category': 'Games','Price':999,'Count':89}}
- my_id = '3520364'
- for key, val in s.items():
- if val['ItemID'] == my_id:
- print('key:', key)
- print('val:', val)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement