-2

I have this list :
listOfWords = ["this","is","a","list","of","words"]
and I need to have [this is a list of words], with a List comprehension.

Cache Staheli
  • 3,144
  • 6
  • 33
  • 44
iratxe
  • 87
  • 8

1 Answers1

0

You mean a list with a single string item?

>>> [' '.join(["this","is","a","list","of","words"])]
['this is a list of words']
bakkal
  • 52,363
  • 10
  • 119
  • 104