Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4215

How to compare the value in the dictionary of python

$
0
0

6 posts

elena (Liu_Xiang) wrote:

I have a dictionary like this {key: value, key2: value2, key3:value3}. How could I know the smallest number of the Value and also tell me the Key that the Value belongs to.
This is what I did, But it return the smallest key, not the value.

Dictionary = {(4, 5): (2.733), (5, 2): (2.4533), (6, 2): (4.533), (7, 3): (1.333)}
Min(Dictionary)
(5,2)


Viewing all articles
Browse latest Browse all 4215

Trending Articles