csv = "a,b,c" parts = csv.split(",") print(parts) # join is called on the separator print("-".join(parts))
text to list and back