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
def eggs(someParameter): del spam[3] someParameter.insert(3, ' and cats.') spam = ['apples', 'bananas', 'tofu', 'cats'] eggs(spam) spam =(','.join(spam)) print(spam)