函数:str.join()
函数说明:
语法:‘base’.join(number)
参数说明:
base:分隔符
number:要连接的元素,可以是序列,字符串,元组,字典,数组等等
返回值:一个以base分隔符连接的各元素的字符串。
实例:
# 以','为分隔符,对序列进行操作
>>>list1 = ['dog', 'cat', 'people', 'pandas', 'monkey']
>>>print(','.join(list1))
dog,cat,people,pandas,monkey