问题代码:
sql = "select role_no,role_name,note from role\
where role_no LIKE '%{0}%' or role_name LIKE '%{1}%' or note LIKE '%{2}%'".format(content,content,content)
出现报错:
TypeError: not enough arguments for format string
找了半天的文章,多数人都是用%s这类的格式化,终于得到解决方案