I tried to make a download list by reading a txt file. The python script can generation a list below. I don't know how to fix the problem that it printed one item in 3 lines. I want one item in one line. Please advice. Thanks a lot.
srr.txt
SRR3468015
SRR3468016
SRR3468017
python lines
f=open("srr.txt")
line=f.readline()
while line:
print "ftp://ftp.sra.ebi.ac.uk/vol1/fastq/"+line[0:6]+"/00"+line[9:]+"/"+line+"/"+line+"_1.fastq.gz"
line=f.readline()
f.close()
actual result
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR346/005
/SRR3468015
/SRR3468015
_1.fastq.gz
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR346/006
/SRR3468016
/SRR3468016
_1.fastq.gz
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR346/007
/SRR3468017
/SRR3468017
_1.fastq.gz
the result I want
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR346/005/SRR3468015/SRR3468015_1.fastq.gz
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR346/006/SRR3468016/SRR3468016_1.fastq.gz
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR346/007/SRR3468017/SRR3468017_1.fastq.gz