On 21/04/2023 23:20, Samuel Muldoon wrote:

# pfr is partially_formatted_result
pfr =r"\mathjax{{color}}{{text}}".format(color = "blue") # ERROR! missing parameter `text`
result =r"\mathjax{{color}}{{text}}".format(text = "Spanish") # ERROR! missing 
parameter `color`

Is there any reason you can't write

pfr =r"\mathjax{{color}}{{text}}".replace("{color}", "blue")

result =r"\mathjax{{color}}{{text}}".replace("{text}",  "Spanish") Best wishes 
Rob Cliffe
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SJTLPRLMJMNF5OTV6XJVKLBLQEFGIPYD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to