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?
a)
allwords=[]
for i in data['Url']:
allwords+= ' '.join(i)
b) all_words = ' '.join([text for text in data['Url']])
About item A
There is an error in your code. To add an element to a list, use the append method:
allwords=[]
for i in data['Url']:
allwords.append(' '.join(i))
Use += to concatenate the string or append method to add an item to a list.
About item B
This works properly because is an attribution.