1. isdigit é¢æ°ã¯æååã®ã¡ã½ãã æååãæ°å¤ã§ãããæ¤æ»ããã¨ãã isdigit é¢æ°ãå©ç¨ããã æ°ãã¤ãããã¨ã¯ããã®ã¡ã½ãããæååã®ã¡ã½ããã§ãããã¨ã 2.3.6.1 æååã¡ã½ãã ã«ããã¨ã isdigit() æååä¸ã«æ°åãããªãå ´åã«ã¯çãè¿ãããã®ä»ã®å ´åã¯å½ãè¿ãã¾ãã 試ãã¦ã¿ãã tests = ["100", "100.1", "", "hoge", "10hoge", "hoge10", "ho10ge", 100] for i,e in enumerate(tests): try: print e.isdigit() except Exception, e: print e, ':', "[%d]" % i, tests[i] çµæã¯ã True False False False False False False 'int' objec
{{#tags}}- {{label}}
{{/tags}}