mardi 31 mars 2015

Python printing a stringon two lines if string beginns with 'l'

so I have some code such as:



print(csv[0])
Genes = csv[0]
OutPut.write(Genes)
OutPut.write(',')
OutPut.write(csv[1])
OutPut.write(',')
try:
OutPut.write(csv[2])
except IndexError:
print("No Lethality")
OutPut.write('\n')


Basically csv has 3 objects and they should print out as this:


atp,10101010,lethal


But for some reason, if csv[0] so the first value, begining with an 'l' it is printed as:


l


sfsf,1010101010,Lethal


I have tried using a for loop etc but I always get the same issue and all the other lines which start without an 'l' work perfectly.


Thanks


Aucun commentaire:

Enregistrer un commentaire