for line in file: new_url=line+'/plus/download.php?link=aHR0cHM6Ly93d3cuYmFpZHUuY29t&open=1' print(new_url.rstrip()) 这样打印的数据是两行
收起
读文件读出的line后面有换行符,rstrip去掉。
for line in file: new_url=line.rstrip()+'/plus/download.php?link=aHR0cHM6Ly93d3cuYmFpZHUuY29t&open=1' print(new_url)
有帮助的话采纳一下哦!
报告相同问题?