But once i swap 'Q' to 'q' at 5 line error is gone
from sympy import *
x = symbols('x')
y=4
gf = 5*x-y
k=solve(gf,'x','c','b','q')
print(k)