Python | split() and join()
You can use split() method to split a string based on a delimiter to a list of strings. and join() method is used to join a list of strings based on a delimiter to give a single string.
Split a string into a list
txt = "Split function breaks down a larger string" txt.split()
Join all items in a tuple into a string
myTuple = ("John", "Peter", "Vicky") x = "-".join(myTuple) print(x)