Python: Find string in a file and print which line it was found on [closed]
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . I have been browsing stack overflow for ages now and could not find a solution to this. I need to find a string in a txt file, and then print which line that string was found on. Being the idiot I am, I could not figure this out myself, and I could not find an answer here. And thus, I need a