1,491 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
686
686 views
tofighi asked Oct 18, 2018
686 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
6.1k
6.1k views
1 1 vote
1 1 answer
1.3k
1.3k views
askdatascience asked Aug 26, 2018
1,290 views
What are the best resources for studying Python?
1 1 vote
1 answers 1 answer
6.7k
6.7k views
1 1 vote
1 1 answer
812
812 views
datascience asked Sep 28, 2018
812 views
Is there any big difference between ingle quotation (' ') and double ("") quotation in Python?