/SingleLineCalculator

:cyclone: Single line calculators for RPN and Infix notation

Primary LanguagePythonMIT LicenseMIT

Single Line RPN

CI
One of the shortest RPN calculator in 1 line; 245 characters

Usage

# For infix notation
$ python slinfix.py <expression>
# For postfix notation
$ python slpostfix.py <expression>

Example:

$ python slinfix.py 2 + 2
4.0

Testing

$ python -m unittest

License

The MIT License