Python has a very good parameter for a function minthat allows you to use an arbitrary function that needs to be minimized, and not just use element-by-element comparison:
result = min(apple.values(), key=lambda x:x['size'])
The parameter keyin most cases replaced the older idiom decoration-process-undecorate, which could be applied here:
result = min((x['size'], x) for x in apple.values())[1]
() ( ), :
result = min(apple.keys(), key=lambda x:apples[x]['size'])
( )
result = min((apples[x]['size'], x) for x in apple.keys())[1]