Below is my code for a Rosalind question to calculate GC content without using Biopython. 
Can anyone give me some suggestions how to improve it? For example, I cannot include the last sequence in the seq\_list inside the for loop and have to append one more time. 
Also, is there a better way to pair seq\_name and GC content so I can easily print out the sequence name with highest GC content?
Thank you very much

```
# to open FASTA format sequence file:
s=open('5_GC_content.txt','r').readlines()

# to create two lists, one for names, one for sequences
name_list=[]
seq_list=[]

data='' # to put the sequence from several lines together

for line in s:
    line=line.strip()
    for i in line:
        if i == '>':
            name_list.append(line[1:])
            if data:
                seq_list.append(data)
                data=''
            break
        else:
            line=line.upper()
    if all([k==k.upper() for k in line]):
        data=data+line
seq_list.append(data) # is there a way to include the last sequence in the for loop?
GC_list=[]
for seq in seq_list:
    i=0
    for k in seq:
        if k=="G" or k=='C':
            i+=1
    GC_cont=float(i)/len(seq)*100.0
    GC_list.append(GC_cont)

m=max(GC_list)
print name_list[GC_list.index(m)] # to find the index of max GC
print "{:0.6f}".format(m)

```