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
