[Tutor] Nested, line by line, file reading

Bob Gailer bgailer at alum.rpi.edu
Sun Dec 16 14:44:57 CET 2007


[snip]

now ponder this:

f=file("prueba.txt.log")
for startline in f:
	if startline.find("2") != -1:
		for endline in f:
			print endline
  			# etc.


More information about the Tutor mailing list