1,409 views
0 0 votes
# for key, value in dict.items():
            #     if value >= long:
            #         long = value
            #         long_name = key
            #     if value < short:
            #         short = value
            #         short_name = key
        long = max(dict.values())
        long_name = max(dict, key=dict.get)
        short = min(dict.values())
        short_name = min(dict, key=dict.get)

Please log in or register to answer this question.

Related questions

0 0 votes
1 1 answer
585
585 views
tofighi asked Oct 18, 2018
585 views
If a big company such as Google behind it, with high probability it is a great library such as TensorFlow. But in general how can I found out?
1 1 vote
1 answers 1 answer
5.9k
5.9k views
1 1 vote
1 1 answer
1.2k
1.2k views
askdatascience asked Aug 26, 2018
1,189 views
What are the best resources for studying Python?
1 1 vote
1 answers 1 answer
6.5k
6.5k views
1 1 vote
1 1 answer
745
745 views
datascience asked Sep 28, 2018
745 views
Is there any big difference between ingle quotation (' ') and double ("") quotation in Python?