0

If I want some special characters in my title I can do something like the following. plt.title(r'$\lambda$') However, I would like to use a dict which helps pick between different strings. So I was wondering if it is possible to parse those?

e.g.

a = '$\lambda$'
plt.title(r a)
Coolcrab
  • 2,655
  • 9
  • 39
  • 59
  • Does this answer your question? [How do I format a string using a dictionary in python-3.x?](https://stackoverflow.com/questions/5952344/how-do-i-format-a-string-using-a-dictionary-in-python-3-x) – FlyingTeller Apr 12 '22 at 12:56
  • in your example `plt.title(a)` would suffice. Can you maybe expand it to show what your usecase would be. Maybe in a more elaborate title? – FlyingTeller Apr 12 '22 at 12:58
  • @FlyingTeller Oh damn, I didn't check to see if that worked... Ok problem solved. – Coolcrab Apr 12 '22 at 13:03

0 Answers0