代码:
dict = {'AB': 1, 'AE': '0', 'CC': '3'} string=','.join([i+str(dict[i]) for i in dict]) print(string)
输出:
AB1,AE0,CC3