Skip to content

Instantly share code, notes, and snippets.

@Tewki
Created January 31, 2016 13:19
Show Gist options
  • Save Tewki/39acc29e9636e8351215 to your computer and use it in GitHub Desktop.
Save Tewki/39acc29e9636e8351215 to your computer and use it in GitHub Desktop.
_in = 1337
n = ['+[]', '+!![]'] + [('+!![]' * n)[1:] for n in range(2, 10)]
print n[_in] if _in < 10 else '+(%s)' % '+'.join(['(%s)' % (n[int(v)] + n[0]) for v in str(_in)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment