On Tue, 28 Aug 2012 03:09:11 -0700 (PDT), mikcec82
<michele.cec...@gmail.com> wrote:
f = open(fileorig, 'r')
nomefile = f.read()
for x in nomefile:
if 'XXXX' in nomefile:
print 'NOK'
else :
print 'OK'
You don't need the for loop. Just do:
nomefile = f.read()
if 'XXXX' in nomefile:
print('NOK')
**
But this one works on charachters and not on strings (i.e.: in this
way I h=
ave searched NOT string by string, but charachters-by-charachters).
Oscar
--
http://mail.python.org/mailman/listinfo/python-list