Created
October 8, 2019 11:56
-
-
Save libdx/ca733dc63cf14bc5a26e1431448b6b5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from math import * | |
import sys | |
if __name__ == '__main__': | |
script = ' '.join(sys.argv[1:]).strip() | |
if len(script) > 0: | |
print(script, '=', end='') | |
result = eval(script) | |
print('', '\033[91m' + str(result) + '\033[0m') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment