I have a text file like this:

Sometext
Somemore
Somemore
maskit

Sometext
Somemore
Somemore
Somemore
maskit

Sometext
Somemore
maskit

I want to search for the string maskit in this file and also need to print 
Sometext above it..SOmetext location can vary as you can see above.

In the first instance it is 3 lines above mask it, in the second instance it is 
4 lines above it and so on..

Please help how to do it?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to