Say i have a list formatted something like:a = [a,2,b,3,c,4,d,3] and i want to write to any file that allows to create superscripts, like:
a^2
b^3
c^4
and so forth. What possible ways can this be done (The indices need to be formatted properly, like actual indices)?