举例说明,近期在学习python的时候需要获取列表信息字段,列表里面嵌套了字典,则需要遍历操作执行

for item in caseinfo:
    for k,v in item.items():
        if type(v) !=dict:
            print(k,v)
        else:
            for k,v in  v.items():
                if type(v) != dict:
                    print(k, v)
                else:
                    for k, v in v.items():
                        print(k,v)

或者获取具体的某一个key值

05-22 20:16