Home >Backend Development >Python Tutorial >How to express subscript in python
How to express subscript in python? Let me give you a detailed introduction to how to express:
The superscript in mathematical formulas uses the ^ symbol, and the subscript uses the _ symbol.
If the superscript and subscript have only one symbol, they do not need to be enclosed in curly braces;
If the superscript and subscript have more than one character, they must be enclosed in curly braces.
Related recommendations: "Python Video Tutorial"
Example:
a_1, a_2, \dots, a_n \newline a_1^2, a_2^2, \dots, a_n^2\newline 2016^{2016}\newline a_{2016}
Effect:
##
The above is the detailed content of How to express subscript in python. For more information, please follow other related articles on the PHP Chinese website!