Let's say I have a list of sentences:
sent = ["Chocolate is loved by all.",
"Brazil is the biggest exporter of coffee.",
"Tokyo is the capital of Japan.",
"chocolate is made from cocoa."]
I want to return all sentences that have the exact full word "chocolate", i.e. ["Chocolate is loved by all.", "chocolate is made from cocoa."]
.
If any sentence does not have the word "chocolate", it shouldn't be returned. The word "chocolateyyy" should not be returned either.
How can I do this in Python?