hopping in a list
Beema shafreen
beema.shafreen at gmail.com
Tue Nov 13 00:41:44 EST 2007
hi everybody,
I have a created list, my code:
res_value = []
fh = open('test','r')
for line in fh.readlines():
data = line.strip().split('\t')
current_span = data[3].strip()
probe = data[2].strip()
length = data[4].strip()
res_value.append(current_span)
res_value.append(probe)
res_value.append(length)
fh.close()
my result:
L = ['35', 'A_16_P21404055', '-59', '355', 'A_16_P21404056', '-57', '167',
'A_16_P03667375', '-59', '5006', 'A_16_P21404058', '-55', '-38',
'A_16_P21404059', '-57', '261', 'A_16_P03667376', '-59', '200',
'A_16_P21404061', '-58', '-43', 'A_16_P03667377', '-59', '308',
'A_16_P21404062', '-58', '67', 'A_16_P03667378', '-54', '226']
if i need to check L[0] < L[3] and L[3]< L[5] and L[5]< L[7]....... and so
on...
if its less then i have to add L[0]+L[2]+L[3] and print the
values.........
how do i do it.....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071113/6f955fd9/attachment.html>
More information about the Python-list
mailing list