I have list which content the following words.
word_list = ['Here', 'is', 'an', 'example', 'of', 'what', 'I', 'am',
'working', 'with', 'But', 'I', 'need', 'to', 'change', 'the format',
'to', 'something', 'more', 'useable']
i would like to this format
word_list = [Here is an example of what I am
working with But I need to change the format
to something more useable]
Is it possible to achieve that? How can I concatenate the words in the list?
I tried for this code. but I achieves a list of words instead of a sentence.
blog_posts=[]
stop = stopwords.words('english')+[
'.',
',',
'--',
'\'s',
'?',
')',
'(',
':',
'\'',
'\'re',
'"',
'-',
'}',
'{',
u'—',
'a', 'able', ]
file=open("resources/ch05-webpages/newspapers/25314/Indexpress111.csv","r+")
#resources\ch05-webpages\newspapers\midday11.csv
#t=[i for i in file.read().split() if i not in stop]
t= [i.replace("'","").replace("?","").replace(":","").replace("\"","").replace("\'","").strip()
for i in file.read().split() if i not in stop]
blog_posts.append((t,))
print blog_posts