Skip to content

Instantly share code, notes, and snippets.

@yuuki
Created August 7, 2012 11:30
Show Gist options
  • Save yuuki/3284665 to your computer and use it in GitHub Desktop.
Save yuuki/3284665 to your computer and use it in GitHub Desktop.
print(sum((int(s) for s in list(str(2**1000)))))
# 1366
@mitsuse
Copy link

mitsuse commented Aug 9, 2012

strを直接forに投げるのではダメなのですか??

print(sum((int(s) for s in str(2**1000))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment