Python dictionary | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Python dictionary

Hey guys! How can I get the second biggest number of a dictionary in python ?

19th Aug 2018, 2:02 AM
Sarah Aguiar
Sarah Aguiar - avatar
1 Réponse
+ 5
try this. x={1:'a',2:'ab',3:'abc'} y=max(x.values(),key=len) print(y) #output=abc
19th Aug 2018, 2:50 AM
Maninder $ingh
Maninder $ingh - avatar