Nov-05-2020, 01:34 AM
Hello, I'm reading a large file line by line and I need to know if certain positions are greater than 0 if not, I don't want to print that line, it should then go to the next line. Example of line below.
Would each position need to be assigned to a variable and then summed or is there a better way? If someone could point me in the right direction. Thanks!
Output:000002250000000000089877000000000000.0002/28/202000000000.00000004698.45
for line in mf.readlines(): if(line[164:171] > 0) ....then print else next lineSo if 4698.45 > 0
Would each position need to be assigned to a variable and then summed or is there a better way? If someone could point me in the right direction. Thanks!