python拼接 1.纯拼接 # num是一个list,元素类型为int num = [1, 2, 3, 4, 5, 6] str = ','.join(str(i) for i in num) print(str) 2.split后拼接 valid_content_list=list(valid_content) content_ids=[item.split('&&')[0] for item in valid_content_list] str_x = ','.join(str(i) for i in content_ids)