The SymPy Live shell does some preparsing of the input to prevent 1/3
from being converted to 0.33333333333. In a normal Python shell, this
does not happen. You should use Rational(1, 3) or S(1)/3. The link
Jason gave explains why this is necessary.
Aaron Meurer
On Tue, Feb 17, 2015 at 11:57 AM, Andre Yonadam <
agy...@gmail.com> wrote:
> Hi thanks for the reply. I wanted to do a simple division and print it out.
> For example print("%d", 5/6). The problem is it doesn't return the formatted
> result like it would in the shell. Do I have to use the S function?
>
https://groups.google.com/d/msgid/sympy/7ba91a47-6809-4aef-a693-db77e3265ce9%40googlegroups.com.