gpt4 book ai didi

Python HTML代码语法错误

转载 作者:太空宇宙 更新时间:2023-11-04 10:52:02 25 4
gpt4 key购买 nike

我在尝试添加超链接时遇到以下语法错误,我查看了 href 的 HTML 代码,HTML 代码似乎是正确的,但 python 抛出语法错误..任何人都可以帮忙吗?

Python代码

    msg_body=("<HTML><head></head>"
"<body>Test"
"<br>Hi All, <br>"
"<b>Wiki @<a href="%s">%s</a> (listed @ go\link) <br><br>"
"<b>Release notes:</b> %s <br><br>"
"<b>Host/Riva Build Combo:</b><br>%s<br><br>"
"<b>Loading instructions:</b><br>%s<br><br>"
"<b>CR fixes:</b><br>%s<br><br>"
"Thanks,<br>"
"B team"
"</body></html>"
) % (wikiURL,Releasenotes,table,Load_ins,crInfo)

错误:-

    "<b>Wiki @<a href="%s">%s</a> (listed @ go\wbit) <br><br>"                                                      ^
SyntaxError: invalid syntax

最佳答案

msg_body="""<HTML><head></head>
<body>Test
<br>Hi All, <br>
<b>Wiki @<a href="%s">%s</a> (listed @ go\link) <br><br>
<b>Release notes:</b> %s <br><br>
<b>Host/Riva Build Combo:</b><br>%s<br><br>
<b>Loading instructions:</b><br>%s<br><br>
<b>CR fixes:</b><br>%s<br><br>
Thanks,<br>
B team
</body></html>
""" % (wikiURL, Releasenotes, table, Load_ins, crInfo)

关于Python HTML代码语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13244378/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com