通过使用print("""{{1}} {}""".format("x"))
,我想打印此:
{{{1}} x
但是我明白了:
{1} x
但是在使用print("""{{{1}}} {}""".format("x"))
(三个而不是两个)之后,我得到了IndexError: tuple index out of range
所以如何在.format上打印双括号?预先感谢。
作为双括号的四括号print("""{{{{1}}}} {}""".format("x"))
在输出中打印一个括号,因此四打印两个]