I have a nested lists contain string example as
[['abc','abc df','pqr'],['xyz','efg']]
I want to concatenate the this nested list into one list of strings such as
['abc','abc df','pqr','xyz','efg']
like that. i use the the code
all_tokens = sum(text, [])
but its bringing me the error saying
can only concatenate list (not "str") to list
Why its happening like that? how to fix the error? also what are the alternative methods to do the same task?
EDIT
i know iterate through a for loop can manage the same thing. but i am searching for a fast method