splitting a list of sentences into separate words in a list

后端 未结 4 390
失恋的感觉
失恋的感觉 2021-01-16 18:33

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         


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-16 19:06

    It sounds like you want something similar to this where a string is split based on whitespace:

    lines[0].split()
    

    The above would split your lines list (which seems to contain 1 item) using the whitespace in that string.

提交回复
热议问题