Python把列表[1,2,3,4,5]组合为由“-”相连的字符串 list_a=[1,2,3,4,5] list_a=[str(x) for x in list_a] str_a='-'.join(list_a) print(str_a) 输出结果: 1-2-3-4-5