ãPyYAMLãï¼ã©ã¤ãã©ãªã¨ãã¦importããã¨ãã¯ãyamlãï¼ã¯ãYAMLå½¢å¼ã®ãã¼ã¿ãæ±ãããã®ã©ã¤ãã©ãªã§ãã YAMLã¯XMLãJSONã¨æ¯ã¹ãã¨ã·ã³ãã«ãªã®ã§èªåã®æã§parseããã®ã§ããã»ã©å¤§å¤ã§ã¯ãªããã¨ã¯æãã¾ããããã¯ããã©ã¤ãã©ãªã使ãã®ãæ©ãã¦ç¢ºå®ãã¨æãã¾ãã PyYAMLã«ã¯å¤§ãã2ã¤ã®æ©è½ââèªã¿è¾¼ã¿ã¨æ¸ãè¾¼ã¿ã¨ãããã¾ãã以ä¸ãé ã«è¦ã¦ããã¾ãã YAMLãã¼ã¿ã®èªã¿è¾¼ã¿ import yaml FILEIN_DICT = "sample_dict.yaml" f = open(FILEIN_DICT, 'r') data = yaml.load(f) # èªã¿è¾¼ã f.close() YAMLå½¢å¼ã®ãã¼ã¿ãèªã¿è¾¼ãã«ã¯ãyaml.load()ã使ãã¾ããå¼æ°ã«ã¯ãèªã¿è¾¼ã¿ã¢ã¼ãã§éãããã¡ã¤ã«ãªãã¸ã§ã¯ãã渡ãã¾ãã 以ä¸ããsample_dict.
{{#tags}}- {{label}}
{{/tags}}