将列表中的字符串转化为key为索引的字典格式 list_data = ["小明","小红"] for i,item in enumerate(list_data): feed[str(i)] = item print(feed) {'0': '小明', '1': '小红'}