Skip to content

Instantly share code, notes, and snippets.

@d0k
Created January 2, 2009 17:54
Show Gist options
  • Save d0k/42619 to your computer and use it in GitHub Desktop.
Save d0k/42619 to your computer and use it in GitHub Desktop.
simple python script to compute the digit sum of an integer
#!/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