I am very new to coding in Python and using the django.
My question: is it possible to get the input-format of an output I get from previous calculations? For example, if I obtain an output is like x**2 how can I get x^2 (x superscript 2) automatically?
for example: 
def home(request):
return render(request, 'home.html', {'name':"suchit"})
def add(request):
sp.init_printing(use_latex=True)
val1 = sp.symbols('val1')
x = sp.symbols('x')
val1 = (request.POST['num1'])
# val2 = int(request.POST['num2'])
# red = add('val1','val2')
# init_printing()
Differentiate = sp.diff(val1,x)
Integrate = sp.integrate(val1,x)
# result = [Differentiate,Integrate]
# integral_steps(res)
return render(request,'home.html',{'result': Differentiate, 'result1': Integrate })
# return render(request, 'home.html ', {'name': 'add'})
OUTPUT is:-
x**2/2
i don't want to this type of output. i want to x superscript 2 /2 (x^2/2). check link to show that format.