Example, I have the following lines in file:
- Tom is a guy
- Sara is a woman
- Alex is a guy too
I would like to search for "Sara" but would like to return the whole like
def findLine(self, str):
...
When I call findLine("Sara")
, it returns "2. Sara is a woman"
How do I accomplish this with Python and Regular Expression (or other non-regular expression method)