pythonåè Pythonã®è¾æ¸(dictå)ãvalueå¤ã§ã½ã¼ã - ããã°ã©ãã³ã°å·¥å ´ / PythonPythonã®ãããããªãã¼ã¿ãã½ã¼ã - ããã°ã©ãã³ã°å·¥å ´ / Pythonè¾æ¸ã½ã¼ãã®åèURLã«éé ã½ã¼ããè¼ã£ã¦ãªãã£ãã®ã§ããªã¹ãã®ã½ã¼ãã¨è¤åãã¦ã¡ã¢ãè¾æ¸ãvalueå¤ã§ã½ã¼ã dict = {'A':500, 'B':200, 'C':300, 'D':100, 'E':400} for k, v in sorted(dict.items(), key=lambda x:x[1]): print(k, v) çµæ D 100 B 200 C 300 E 400 A 500 ãªã¹ãã2ã¤ç®ã®å¤ã§éé ã½ã¼ã list = [('A', '500'), ('B', '200'), ('C', '300'), ('D', '100'), ('E', '400')] f
{{#tags}}- {{label}}
{{/tags}}