I know in python there is a way to turn a word or string into a list using list()
, but is there a way of turning it back, I have:
phrase_list = list(phrase)
I have tried to change it back into a string using repr()
but it keeps the syntax and only changes the data type.
I am wondering if there is a way to turn a list, e.g. ['H','e','l','l','o']
into: 'Hello'
.