2. Sort the following dictionary based on the keys so that they are sorted a to z. Assign the resulting value to the variable sorted_keys. PLEASE PROVIDE THE CODE dictionary = {"Flowers": 10, 'Trees': 20, 'Chairs': 6, "Firepit": 1, 'Grill': 2, 'Lights': 14} [PYTHON]
Answers
Answered by
0
-2
Because
10-4=6 ,6-4=2 , 2-4=-2
Answered by
3
L = ['E', 'F', 'B', 'A', 'D', 'I', 'I', 'C', 'B', 'A', 'D', 'D', 'E', 'D']
d = {}
for x in L:
if x in d:
d[x] = d[x] + 1
else:
d[x] = 1
for x in d.keys():
print("{} appears {} times".format(x, d[x]))
Similar questions
Biology,
4 months ago
Math,
4 months ago
Social Sciences,
4 months ago
Math,
8 months ago
Political Science,
8 months ago
Biology,
11 months ago
Math,
11 months ago
Math,
11 months ago