我试图在input
语句中使用input
变量,但出现以下错误。在
这是我的代码:
sheetname=input("Enter the name of the SEO Analysis sheet:")
cur=conn.execute("select * from seo_info where url like '%?%'",sheetname,)
print(cur.fetchall())
这里有一个错误:
^{pr2}$这里是another question,它解决了问题的一部分,但它仍然给我错误。
也许我的代码中遗漏了一些东西?在
我做到了!在
实际上,
?
周围不需要括号,因此可以使用list
作为execute
的第二个参数来实现您想要的:或者
^{pr2}$tuple
:相关问题 更多 >
编程相关推荐