> > Hey, I'm wondering how to read individual strings in a text file. I can > read a text file by lines with .readlines() , > but I need to read specifically by strings, not including spaces. Thanks > in advance >
How about: for a_string in open("/path/to/file").read().split(): print(a_string) -- https://mail.python.org/mailman/listinfo/python-list