('word1', 'word2')
If I have a tuple, how can I add all of the words in the tuple into one string?
Desired output:
word1 word2
('word1', 'word2')
If I have a tuple, how can I add all of the words in the tuple into one string?
Desired output:
word1 word2
Use str.join:
tpl = ("word1", "word2")
s = " ".join(tpl)
print(s)
Prints:
word1 word2