示例:(name.txt) 萨曼莎是个好女孩 njfha djfhwoa oHWEFHL JAIF ASJFJJIOG AHFUHIEWA CJSHDF SD IOAF JEIWJO JIJFODHUF
代码:
with open('name.txt', 'r') as f:
for line in f:
if "samantha" in line:
print next(line) #it should print all the lines other than samantha line