string.find does not work in file

Wolfram Strauß str at
Tue Jun 17 11:06:32 CEST 2003

I have a problem to run the following lines in a file.
import string
f = open('in.txt')
for l in f.readlines():
	print string.find(l, '"\n')

In my python shell (version 2.2.2) on a W2000 system the code finds all 
lines with the pattern. But running the same code as a python scipt in a 
shell it does not find any pattern.

If you have any idea, please let me know. Thanks Wolfram

Using M2, Opera's revolutionary e-mail client:

More information about the Python-list mailing list