First time here? Check out the FAQ!
answered 2018-01-29 18:22:17 +0200
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).
'${a}$'.format(a=2)