At first, I have "C:/test02.txt"
too good positive
a film for stunt scheduling i think objective
My codes
with open('C:/test01.txt') as words:
ws = words.read().splitlines()
with open('C:/test02.txt') as file_modify4:
for x in file_modify4:
sx = map(str.strip, x.split("\t"))
ssx = sx[0].split(" ") ## list
for w in ssx:
if w in ws:
w = "" ## w...str'
print w
After that, I remove some word and results show each word in separate line
good
film
stunt
scheduling
i
think
How I can merge them back to
good
film stunt scheduling i think