In Python 3.3, is there any way to make a part of text in a string subscript when printed?
e.g. H₂ (H and then a subscript 2)
If you want to use it on the axes of a plot you can do:
import matplotlib.pyplot as plt plt.plot([1]) plt.ylabel(r'$H_{2}$') plt.show()
which gives