摘要:
s = "python\n\t\ris\ngood\t" remap = { ord('\t'): ' ', # \t替换成空格 ord('\n'): None, ord('\r'): None # Deleted } a = s.translate(remap) print(a) 使用了trans 阅读全文
摘要:
合并字典组成的列表 最近做了个数据合并的需求这里记录下: 题目要求如下: dict_of_list1 = [{"name": "zhangsan", "age": 18}, {"name": "lisi", "age": 19}, {"name": "wangwu", "age": 20}] dic 阅读全文