With the given input I need to figure out how to get my out put to look as follows. I cannot get rid of the brackets which is my first problem.
X= ["This is a hairy #calf",
"goodbye to the snow #gone",
"13742 the digits to give",
"Remember the name d - mayne",
"I hate you"]
Output =
This is hairy calf
goodbye to the snow gone
the digits to give
Remember the name mayne
I hate you
This is what I've tried:
X= """["This is an hairy #calf",
"goodbye to the snow #gone",
"13742 the digits to give",
"Remember the name d - mayne",
"I hate you"]"""
X_modified=re.sub(r"[#+-\.\"\n""[""]","",X)
X_modified