Join a list of strings in python and wrap each string in quotation marks
list, python, string
Solution
Update 2021: With f strings in Python3
>>> words = ['hello', 'world', 'you', 'look', 'nice']
>>> ', '.join(f'"{w}"' for w in words)
'"hello", "world", "you", "look", "nice"'
Original Answer (Supports Python 2.6+)
>>> words = ['hello', 'world', 'you', 'look', 'nice']
>>> ', '.join('"{0}"'.format(w) for w in words)
'"hello", "world", "you", "look", "nice"'
Problem
I've got: ``` words = ['hello', 'world', 'you', 'look', 'nice'] ``` I want to have: ``` '"hello", "world", "you", "look", "nice"' ``` What's the easiest way to do this with Python?