mystring = 'hello, world' mylist = string1.split(', ') #output => ['hello', 'world'] myjoin1 = ', '.join(mylist) #output => 'hello, world' myjoin2 = ' '.join(mylist) #output => 'hello world' myjoin3 = ','.join(mylist) #output => 'hello,world'