def list_test(a):
list1=[]
def list_all_dict(a):
#检测字段类型
if isinstance(a,dict):
for x in range(len(a)):
temp_key=list(a.keys())[x]
temp_value=a[temp_key]

if isinstance(temp_value,dict):
list_all_dict(temp_value)
else:
list1.append(temp_value)
list_all_dict(a)
return list1
if __name__=="__main__":
a={"sex":"eee","name":{"sex":"de","ede":"egg"}}
print(list_test(a))

相关文章:

  • 1970-01-01
  • 2022-02-18
  • 2021-08-16
  • 2021-06-25
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案