Python ã§ãªã¹ãããè¾æ¸ãä½æããæ¹æ³ã«ã¤ãã¦ãç´¹ä»ãã¾ãã è¦ç´ æ° 2 ã®ã¿ãã«ãããªããªã¹ãã®å ´å ã¾ãã¯å ã®ãªã¹ããè¦ç´ æ° 2 ã®ã¿ãã«ããã§ãã¦ããå ´åã§ãããã®å ´åã¯ãã®ã¾ã¾ dict() ã使ãã¾ãã # ãªã¹ãã®è¦ç´ ããã§ã«2åçµã®ã¿ãã«ã¨ãªã£ã¦ãã li1 = [("a", 3), ("b", 2), ("c", 5)] di1 = dict(li1) # => {'b': 2, 'c': 5, 'a': 3}
{{#tags}}- {{label}}
{{/tags}}