Is there a simpler way to concatenate string items in a list into a single string? Can I use the str.join() function?
str.join()
E.g. this is the input [\'t
[\'t
Use join:
>>> sentence = ['this','is','a','sentence'] >>> '-'.join(sentence) 'this-is-a-sentence'