Print next characters in line Python -
i looking make simple program find character , print next 10 characters in line. have been able make print out whole line , rest of line useless. have now.
f = open("active notship.txt", "r") searchlines = f.readlines() f.close() i, line in enumerate(searchlines): if "p-" in line: print line
kevin right. did.
f = open("active notship.txt", "r") searchlines = f.readlines() f.close() i, line in enumerate(searchlines): if "p-" in line: print line[3:13]
Comments
Post a Comment