Home > Backend Development > Python Tutorial > Python list method to merge connection strings

Python list method to merge connection strings

高洛峰
Release: 2017-01-13 16:35:00
Original
2017 people have browsed it

For example, the following list

binfo = ['lao','wang','python']
Copy after login

We know through the help method that it can be solved by using the join method of string.

Below we use spaces to connect 3 words:

content = " ".join(binfo)
print content
Copy after login

The result is: lao wang python

For more related articles on python list methods of merging connection strings, please pay attention to PHP Chinese website!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template