iterating over the other and finding the greatest

Beema shafreen beema.shafreen at gmail.com
Sat Oct 27 23:39:28 EDT 2007


hi everybody,
                 I have file with four columns:the content:
   column1    column2     col3       col4
10000175    10000234    43    A_16_P03652190
10000277    10000336    387    A_16_P41582022
10000723    10000782    98    A_16_P03652191
10000880    10000932    270    A_16_P41582024
10001202    10001261    539    A_16_P41582025
10001800    10001859    16    A_16_P41582026
10001875    10001923    43    A_16_P21378376
10001966    10002011    361    A_16_P03652193

for the column3 :
have carry out a process a>b then i should print the line and if b>c then i
should print the line and c>d then i should print....... like this i have to
continue.say for eg: 43<387 so the first row is omitted, 387 is greater then
98 so i can print the line second row...
my code:
 fh = open('364010_spacing','r')
for lines in fh.readlines():
        data = lines.strip().split('\t')
        start =data[0].strip()
        end = data[1].strip()
        values = data[2].strip()
        id = data[3].strip()
        if a > b :#hanged up here
                        print lines
but i am not able to do the above,,,, can you people guide me in a right
way.. I should proceed further...
regards
shafreen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071028/00c30bf7/attachment.html>


More information about the Python-list mailing list