0

Is there a way to delete every n bytes from one point to the first byte? This s quite confusing. What I've done:

a = open("file.txt","r")
b = a.read()
a.close()

findit = "WIN - PLACE"
texto = b.find(findit)

And now I need to delete everything before "WIN - PLACE", its like 20 lines that i have to delete. Any ideas? Thanks

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by pyTony
0

Oh my god. That did it. It was really easy. Thank you again ;)

0

Oh my god. That did it. It was really easy. Thank you again ;)

Next time you can think if the complement of the problem is easier to solve than problem you are tacling.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.