How do I convert a list into a string with spaces in Python?

前端 未结 6 1494
死守一世寂寞
死守一世寂寞 2020-12-04 22:54

How can I convert a list into a space-separated string in Python?

For example, I want to convert this list:

my_list = [how,are,you]

6条回答
  •  甜味超标
    2020-12-04 23:45

    Why don't you add a space in the items of the list itself, like :
    list = ["how ", "are ", "you "]

提交回复
热议问题