Here is the line:
'''This is a test { <-- escape these ---> } '''
I would like to avoid
{
and
}
in format, how can I do this? Thank you
String syntax format :
If you need to include a bracket character in a literal text, you can avoid it by doubling it: {{and}}.
Try the following:
'''This is a test {{ <-- escape these ---> }} and the value is {0}'''.format(42)
Source: https://habr.com/ru/post/902734/More articles:Special Values ββCSS *, \ 0 / - csshow to show a string as html content in a web form - c #SELECT Hibernate Polymorphic HQL statement - javaPutting default value in - javascriptgoogle oAuth - how to remove cookie after login from google oAuth - oauth-2.0How to implement an algorithm for related articles using this form of collaborative filtering - sqlOrientation WPF - wpfConstructor embedding - is it normal to use a new null object if the constructor does not specify? - language-agnosticToast does not appear on HTC Sense 3.0 lock screen - androidEclipse: search string in selected packages? - javaAll Articles