>>> list = ["(",")"] >>> ",".join("12345").join(list) Out: '(1,2,3,4,5)'
Ответ 4
Edit from the future: Please don't use the answer below. This function was removed in Python 3 and Python 2 is dead. Even if you are still using Python 2 you should write Python 3 ready code to make the inevitable upgrade easier.