PY
py
1
2
3
4
5
6
7
8
9
10
11
12
# Min/Max values in a dictionary.
dict = {
"key1":10,
"key2":22,
"key3":-2,
"key4":-15,
"key5":-25
}
highest = max(dict[i] for i in dict)
lowest = min(dict[i] for i in dict)
print("highest value is %d" % highest)
print("lowest value is %d" % lowest)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run