ãªã¹ãã®å å 表è¨ï¼list comprehensionsï¼ã¯ãå½åé¢æ°åè¨èªHaskellã§ç¨ãããã¦ãããã¨ã§æåã«ãªã£ããPythonã§ãªã¹ãã®å å 表è¨ãç¨ããã¨ãå¤æ対象ã®ãã¼ã¿ã«æ³¨ç®ãã¦ã³ã¼ããè¨è¿°ãããã¨ãå¯è½ã«ãªããããã¯ãé¢æ°ã«æ³¨ç®ãã¦ã³ã¼ããè¨è¿°ãã¦ãããã¤ã¦ã®æ¹æ³ã¨ã¯ã¾ã£ããç°ãªãææ³ã ã ãªã¹ãã®å å 表è¨ãç¨ãã¦è¡ãããã¨ã¯ãã¹ã¦ãçµã¿è¾¼ã¿ã®mapé¢æ°ã¨filteré¢æ°ãç¨ãã¦è¨è¿°ãããã¨ãå¯è½ã§ããããããããªã¹ãã®å å 表è¨ãå©ç¨ããã¨ããã使ç¨ãç°¡åã§å¯èªæ§ã®é«ãã³ã¼ããè¨è¿°ã§ãããæ¬ç¨¿ã§ã¯ãåç´ãªä¾ãããã¤ãç¨ãã¦ãªã¹ãã®å å 表è¨ã®å¼·åãããè¦ããããã Pythonã§ãªã¹ããè¨è¿°ããéã¯ã以ä¸ã®ããã«ãã¦åã¢ã¤ãã ã並ã¹ã¦ãã©ã±ããã§ãããã >>> wordlist = ['HELLO', 'World', 'how', 'aRe', 'YOU?'] ãªã¹ãã®
{{#tags}}- {{label}}
{{/tags}}