1. Sort the list, lst from largest to smallest. Save this new list to the variable lst_sorted.
lst = [3, 5, 1, 6, 7, 2, 9, -2, 5]
[PYTHON]
Answers
Answered by
2
Answer:
the below code line if you run this will definitely going to give you desired result
Explanation:
lst=[3,5,1,6,7,2,9,-2,5]
lst.sort(reverse = True)
print(numbers)
Answered by
1
medals = {'Japan':41, 'Russia':56, 'South Korea':21, 'United States':121, 'Germany':42, 'China':70}
def g(k,d):
return d[k]
ks = medals.keys()
top_three = sorted(ks,key=lambda x : g(x,medals),reverse = True)
follow Me
Similar questions