I have a text file: flower.txt
content in file:
flower white
flower red
flower green
flower blue
Have some other text to the end of file.
I want to grep the line, that is last occurrence of word "flower" and validate the line if it is "flower blue".
Not sure which function helps doing this.
import re
with open('flower.txt', "r") as f:
will re.find
help???