>>> name=‘lizhanguo wangyuwei lixuehan‘
>>> a = name.split()
>>> a
[‘lizhanguo‘, ‘wangyuwei‘, ‘lixuehan‘]
>>> b = ‘,‘.join(a) 注:以逗号分隔
>>> b
‘lizhanguo,wangyuwei,lixuehan‘
>>> c = ‘ ‘.join(a) 注:以空格分隔
>>> c
‘lizhanguo wangyuwei lixuehan‘
时间: 2024-10-27 14:01:28