以‘ ‘.join()的方式将列表转为字符串,要求list中的元素都是字符串,否则需要map(str, list)进行转换。 12 a = [{"a":1}, {"b":2}] ','.join(map(str, a)) 赞微海报分享
近期评论