Turn a list into a string

advertisements

What is the pythonic way to perform the below transformation?

[a, b, c] -> "'a', 'b', 'c'"

Where a, b, and c are all variables holding strings.


Just turn it into a string the normal way and remove the brackets that you don't want?

str(mylist)[1:-1]