I have below two doubts
1)I am trying to build a wordcloud and for doing that am defining a variable a=[ ] but it throws error but if I define it as a='' it works well. Please tell me what is the difference between them?
- I am using below two for loops but both of them show difference output whereas I expect them to show the same? What is the difference between them.
a)
allwords=[]
for i in data['Url']:
allwords+= ' '.join(i)
b) all_words = ' '.join([text for text in data['Url']])