Created
March 13, 2013 02:12
-
-
Save hit9/5148856 to your computer and use it in GitHub Desktop.
字符串转数字. eg: "3456" => 3456
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reduce(lambda x,y:10*x+y,map(lambda x:ord(x)-48,a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment