How to get specific values from a list of multiple dictionaries

I have a list of dictionaries as check_list = [{'datasource_path': 'Checks/', 'Result': True, 'kwargs': {'column_name': 'car_id', 'd_type': 'int', 'table': 'cars/'}, 'type': 'check_datatype'}, {'datasource_path': 'Checks1/', 'Result': False, 'kwargs': {'column_name': 'customer_id', 'd_type': 'str', 'table': 'cars1/'}, 'type': 'check_datatype1'}]

  I was trying this - 

 res = [[i for i in check_dict[x]] for x in check_dict.keys()] 
 print("The list values of keys are : " + str(res)) 

what i want to get as output is list of lists as below-

[[ Checks/,True,'cars/',check_datatype],[ Checks1/,False,'cars1/',check_datatype1]]

Read more here:

Content Attribution

This content was originally published by Sumit Dwivedi at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: