x=5
exec("a{}=x+5".format(1))
Output:
TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_10972/452547662.py in <module>
1 x=5
2
----> 3 exec("a{}=x+5".format(1))
TypeError: 'str' object is not callable