Article From:

1. list”, using”.join ().

# Create a listLIST1 = ['a','b','c']Splicing the elements of the list into stringsPrint (''.join (LIST1))The elements of the list are concatenate into a string by a space.Print ('.'.Join (LIST1))

2. string” to convert to list, using split ().

# The string is divided by a space, and each item is divided into one element of the list.Print (str1.split ('))

Leave a Reply

Your email address will not be published. Required fields are marked *