用python实现将文本中的内容转为字典格式13711111221123456137122111111234561371111122123456
text = "13711111221,123456\n13712211111,123456\n1371111122,123456\n"
lst = text.strip().split("\n")
result = {}
for item in lst: key, value = item.split(",") result[key] = value
print(result)
原文地址: https://www.cveoy.top/t/topic/bMEr 著作权归作者所有。请勿转载和采集!