I am very new to coding (just about few months in Python) and NLTK (~1 month). I have a list of sentences that I filtered out with [ i for i in TokenizedSentences if "apple" in i ] and it looks like this--
itemDict["Apple"] = [ i for i in TokenizedSentences if "apple" in i ]
output:
["An apple a day, keeps a doctor away.", "My favorite desert is apple pie.", "Apple candy is sold out!!"]
I want to make each sentence a new line when I save the result to CSV file. A similar analogy would be Alt +Enter in Excel for PC and CTRL-OPT-RETURN in numbers for Mac. Is it possible? I have tried Textwrap, but the result is not exactly what I want.
Desired output:
["An apple a day, keeps a doctor away.",
"My favorite desert is Apple pie.",
"Apple candy is sold out!!"]
Thank you!