on-internet
← Community

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

Stack Overflow ·

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"] into the string "how are you". The spaces are important. I don't want to get "howareyou".

Comments

Sign in or sign up to comment and upvote.

No comments yet.