Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello,i am a new pythoner,have a problem,please help... #7

Open
ddzzhen opened this issue Apr 10, 2018 · 0 comments
Open

hello,i am a new pythoner,have a problem,please help... #7

ddzzhen opened this issue Apr 10, 2018 · 0 comments

Comments

@ddzzhen
Copy link

ddzzhen commented Apr 10, 2018

cols, args = zip(*kw.iteritems())

  1. cols, args = zip(*kw.iteritems()) *kw是不是应该改成kw 以便使用iteritems()方法提取k w ?
  2. sql='insert into %s(%s) values(%s)'%(table,','.join(['%s'% col for col in cols]),','.join(['?' for i range(len(cols))]))中 第二个%s是要插入的列 第三个%s是要插入的值 ,所以 ','.join(['%s'% col for col in cols]),','.join(['?' for i range(len(cols))])是不是反了?

3.还有一个弱智的问题,第一个%s使用'``'符号是什么意思?

还请帮忙,小白看不懂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant