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
list = ['aaa', 'bbb', 'ccc'] string = ''.join(list) print(string) >>> aaabbbccc string = ','.join(list) print(string) >>> aaa,bbb,ccc string = '-'.join(list) print(string) >>> aaa-bbb-ccc string = '\n'.join(list) print(string) >>> aaa >>> bbb >>> ccc