Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import json
- def main():
- """
- Add Documentation here
- """
- pass # Replace Pass with Your Code
- winners = """
- {
- "recipes": {
- "shabloli_vanil": {
- "mitzrahim": {
- "flowr": "200",
- "suger": "150",
- "yeast": "20",
- "butter": "20"
- }
- },
- "kogelof": {
- "mitzrahim": {
- "tzimok": "100",
- "suger": "200",
- "flow": "110",
- "milk": "200",
- "suger_poweder": "20"
- }
- },
- "choclate muffin": {
- "mitzrahim": {
- "choclate": "200",
- "flow": "200",
- "suger": "100",
- "butter": "75"
- }
- }
- }
- }"""
- json_obj = json.loads(winners)
- for item in sorted(json_obj['recipes'],reverse=True):
- print(item + ":")
- for key, value in json_obj['recipes'][item]['mitzrahim'].iteritems():
- print(key + ":" + " " + value)
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement