Created
January 2, 2009 17:54
-
-
Save d0k/42619 to your computer and use it in GitHub Desktop.
simple python script to compute the digit sum of an integer
This file contains hidden or 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
#!/usr/bin/env python | |
from sys import argv | |
print(sum(int(x) for x in argv[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment