I have a list which consists of lines as
lines = [\'The query complexity of estimating weighted averages.\', \'New bounds for the query complexity of a
You can join all lines and then use split():
split()
" ".join(lines).split()
or you can split each line and chain:
from itertools import chain list(chain(*map(str.split, lines)))