#start############################################################
import re
exclude = re.compile('vn|vt|^$|^#')
fileName = '/tmp/x'
theFileOpened = open(fileName,'r')
theTextAsList = theFileOpened.readlines()
theTextAsListStripped = []
for aLine in theTextAsList:
theTextAsListStripped.append(aLine.strip("\n"))
theTextAsListNoVn = [x for x in theTextAsListStripped if not
re.search(exclude,x)]
print theTextAsListNoVn
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor