I have one text file as follows with 2 columns
44333373 -5.829738285
3007762 -5.468521083
16756295 -5.247183569
46197456 -5.216096421
46884567 -5.195179321
44333390 -5.162411562
44420579 -5.133122186
6439190 -5.028260409
...
I want to extract values which greater than -5.162411562 ideal output should look like
Output
44333373 -5.829738285
3007762 -5.468521083
16756295 -5.247183569
46197456 -5.216096421
46884567 -5.195179321
To accomplish this task i wrote simple python script
f1=open("file.txt","r")
n=0
for line in f1.readlines():
if float(n) > -5.162411562:
print line
But it is just reading all data in file. I know it is a very simple task but I am not able to figure out where I am going wrong. Can anybody help?