I have a list of tuples that looks like this:
[('this', 'is'), ('is', 'the'), ('the', 'first'), ('first', 'document'), ('document', '.')]
What is the most pythonic and efficient way to convert into this where each token is separated by a space:
['this is', 'is the', 'the first', 'first document', 'document .']
Very simple:
[ "%s %s" % x for x in l ]
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