Article From:https://www.cnblogs.com/allen2333/p/9062507.html

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 ('))

Similar Posts:

Leave a Reply

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