Skip to content

Instantly share code, notes, and snippets.

@rtaycher
Created July 1, 2019 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtaycher/9dd73e9e4bfadc8431ad7abf98c449b2 to your computer and use it in GitHub Desktop.
Save rtaycher/9dd73e9e4bfadc8431ad7abf98c449b2 to your computer and use it in GitHub Desktop.
single line 255 char repl
#!/usr/bin/env python
# single line 255 char repl
l={};e=lambda s:exec("import traceback;\ntry:\n try:\n l['_']=eval(s,globals(),l)\n except SyntaxError:\n l['_']=exec(s,globals(),l)\nexcept Exception: traceback.print_exc()") or (l['_'] if l['_']!=None else '');list(print(e(input('>'))) for _ in range(99))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment