I have a file with some equations. I want to solve them using sympy. I can use open('problems.txt',mode='r') to open the file. But how to proceed with sympy? I'm getting following error
sympy.core.sympify.SympifyError: Sympify of expression 'could not parse 'x+x+x-x = 18 + 4'' failed, because of exception being raised: SyntaxError: invalid syntax (, line 1)
I'm using Python 3.4.2
parse_expr should be able to get you going:
output:
using sympy version 0.7.6