I have a .log file in python. For example:
**** start logging ****
line 1
line 2
line 3
**** end logging ****
**** start logging ****
line 4
line 5
line 6
**** end logging ****
I want to read and print only the last logging of this file (when **** start logging **** is written). In our case:
**** start logging ****
line 4
line 5
line 6
**** end logging ****
As I know. the .read() and .seek() functions in python should be sufficient for this mission. But as I see, seek() only get offset, not a string variable.
How can I take only a specific part in this .log file?