两列数据,第一列是姓,第二列是名的首字母。
我想循环生成生成一个url,url有一定的规律,https://query=authlastname() and authfirst(),第一个括号填第一列的值,第二个填第二列。
也就是要得到三个url:https://query=authlastname(Mike) and authfirst(J.),https://query=authlastname(John) and authfirst(P.), https://query=authlastname(Chris) and authfirst(S.)
用python的语句就是:
for authlastname, authfirst in names:
url = "https://query=authlastname(Sapienza) and authfirst(P.)% (authlastname, authfirst)