+ 3
"'{ is another part of {0}".format("}")
could anyone tell me how to be express as '{' and '}' in the string before '.format'.my english is not good, if my question is not clear you can ask me.
7 ответов
0
Me too... my english is not good
where are you from?
0
I'm Algerian and i speak arabic
0
china and i speak chinese
0
ok I'm from Algeria and i speak arabic
0
Try escaping the char, e.g \{
0
3q
0
Escaping characters like \{ doesn't work here, use double brackets instead. Your code doesn't work because you have unclosed bracket at the start. So use
"{{ is another part of {0}".format("}")