Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def disarm_short(num):
return (sum(int(j) ** (i+1) for i,j in enumerate(str(num))) == num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment