Ask Your Question

Revision history [back]

Use Python string formatting.

Find more information about Python string formatting at https://pyformat.info.

For your example, you could use: '${a}$'.format(a=2).