I wanted to build a string from a list.
I used the string.join() command, but if I have :
['hello', 'good', 'morning']
I get : hellogoodmorning
Is there a method that allows me to put a space between every word ? (without the need to write a for loop)
kind regards.
All you need to do is add the space in front of join.
' '.join(list)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With