The data:
list = [\'a\',\'b\',\'x\',\'d\',\'s\']
I want to create a string str = \"abxds\". How can I do that?
Right now I am doing
The thing you're looking for is str.join():
str.join()
>>> L = ['a','b','x','d','s'] >>> ''.join(L) 'abxds'
(Don't name your variable list, it's a builtin name.)
list