Python) I want to find a certain string and then print it out

Asked 2 years ago, Updated 2 years ago, 24 views

I called up a text file and found a line with a sentence with startswith So I want to print it out after that line, is there a way?

python

2022-09-21 14:47

1 Answers

The readlines method can be obtained in line units (list).

You can see the line, so you can approach it with an index.


2022-09-21 14:47

If you have any answers or tips


© 2025 OneMinuteCode. All rights reserved.