标签: python python-3.x string string-formatting
我在 Python 中学习字符串格式运算符时遇到了这段代码:
print('%(language)s has %(number)03d quote types.'%\ {"language":"Python", "number":2})
“\”在这段代码中代表什么?
答案 0 :(得分:1)
正如您在 Python's documentation 中所读到的,反斜杠会中断代码行,以便下一行继续。