repl.it
@me002/

one line calculator

Python

No description

fork
loading
Files
  • main.py
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
#with (type("tryExcept", (object,), {"__enter__": (lambda *args: None), "__exit__": (lambda *args: True)}))(): cmd = input(__import__('termcolor').colored(">>>",'blue')); print(__import__('termcolor').colored('error', 'red')) if False in [(lambda i: True if i in '1234567890+-*/ ' else False)(x) for x in cmd] else print(__import__('termcolor').colored('= %s' % eval(cmd), 'blue'))
Fetching token
?