I get this error. What am I doing wrong with the macro?
from sympy import *
var('y')
x=10
d=factorint(x)
print(d)
for k, v in d.items():
y=y+str(k)+'^' +str(v)
print(y)
# {2: 1, 5: 1}
# Traceback (most recent call last):
# File "C:/xxx/.PyCharmCE2018.2/config/scratches/soinsuu.py", line 9, in <module>
# y=y+str(k)+'^' +str(v)
# TypeError: unsupported operand type(s) for +: 'Symbol' and 'str'
#
# Process finished with exit code 1
i want
10=2^1+5^1
10=2**1+5**1