è²ã ã¨Tracã®ã½ã¼ã¹ãçºãã¦ãããããã³ã¼ããçºè¦ããã®ã§ãå¿ããªãããã«ã¡ã¢ ã³ã³ã® 60è¡ç®ããå¼ç¨ 60 DIGITS = re.compile(r'(\d+)') 61 def embedded_numbers(s): 62 """Comparison function for natural order sorting based on 63 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/214202.""" 64 pieces = DIGITS.split(s) 65 pieces[1::2] = map(int, pieces[1::2]) 66 return pieces ãããã¨ãããåãããããããã«ãã¦è»½ãå®è¡ãã¦ã¿ãã¨ãããªæã >>> import re >>> DIGITS = re.compi
{{#tags}}- {{label}}
{{/tags}}