python如何将列表里面的字符串连接起来

时间:2024-10-13 03:09:25

1、新建一个空白的py文件

python如何将列表里面的字符串连接起来

2、写入一个列表,“te衡痕贤伎st = ["welcome", "to", "python"]”

python如何将列表里面的字符串连接起来

3、创建一个变量t,值为“空格”

python如何将列表里面的字符串连接起来

4、用join的方式,将列表的字符串用空格隔开连在一起

5、运行一下,看看结果

python如何将列表里面的字符串连接起来
© 手抄报圈