Templates in python
You can change the "$" delimiter to any other. The following example:
You can read de docs here
Simple data output program using template
Templates support $-based substitutions instead of %-based substitution. Substitute (mapping, keywords) performs template substitution, returning a new string.
Mapping is any dictionary-like object with keys that match with the template placeholders. In this example, price and qty are placeholders. Keyword arguments can also be used as placeholders. Placeholders from keywords take precedence if both are present.