Python equivalent for PHP’s implode?

Use the strings join-method. print(‘ ‘.join([‘word1’, ‘word2’, ‘word3’])) You can join any iterable (not only the list used here) and of course you can use any string (not only ‘ ‘) as the delimiter. If you want a random order like you said in your question use shuffle. In the comment there was the question … Read more