Given a list of strings, write a Python program to convert the given list of strings into a space-separated string.
Input : ['geeks', 'for', 'geeks'] Output : geeks for geeks Input : ['Python', 'Language'] Output : Python Language
Approach #1 : Python string translate()
The string translate() method returns a string where each character is mapped to its corresponding character in the translation table. The limitation of this method is that it does not work for Python 3 and above versions.
geeks for geeks
Approach #2 : join() function
The join() method is a string method and returns a string in which the elements of sequence have been joined by str separator. In this approach space is the separator.
geeks for geeks
- Python | Convert key-value pair comma separated string into dictionary
- Python | Convert list of strings to list of tuples
- Python | Convert list of tuples to list of strings
- Python | Convert case of elements in a list of strings
- Python | Convert list of string into sorted list of integer
- Python | Convert list of numerical string to list of Integers
- Python | Convert a string representation of list into list
- Python | Convert string enclosed list to list
- Python | Convert list of string to list of list
- Python | Program to convert String to a List
- Python | Convert a list of characters into a string
- Python program to convert a list to string
- Python | Ways to convert list of ASCII value to string
- Python | Convert list of strings and characters to list of characters
- Python | Splitting string list by strings
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.