search file for tabs

beliavsky at aol.com beliavsky at aol.com
Tue May 2 17:51:06 EDT 2006


The following code to search a file for tabs does not work, at least on
Windows XP. Could someone please tell me what's wrong? Thanks.

xfile = "file_with_tabs.txt"
for text in open(xfile,"r"):
    text = text.strip()
    if ("\t" in text):
        print text




More information about the Python-list mailing list