I assume by "huge data" you mean the file won't all fit into memory, so you have to go line by line.
I also assume you just want to save up the 50 or so rows you are looking for and that those will fit into memory.
So Like this:
theDataIWant = []
def isThisSomethingIWant(x, y, z):
return the condition involving ... x ... y ... z ...
for line in open('myfile','r'):
x, y, z = line.split(" ")
if isThisSomethingIWant(x, y, z):
theDataIWant.append( (x, y, z) )