-->

Saturday, March 9, 2013

regular expression insensitive to newlines

when you are reading the file, just get rid of all the newlines

open('myfilename.txt').read().replace('\n', '') 

No comments:

Post a Comment