Use re package with text file : Split : Regular Expressions PYTHON TUTORIALS


PYTHON TUTORIALS » Regular Expressions » Split »

 

Use re package with text file


import re
f = open('whodata.txt', 'r')
for eachLine in f.readlines():
         print re.split('ss+', eachLine)
f.close()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Regular Expressions
» Split