# -*- coding: utf-8 -*- for row in open('c:\\1.txt').readlines(): print row print row.find(u'脚本分享网')