Howto python lambdafunction

Configure test JSON Format
{"body": "{\"key1\":\"value1\",\"key2\":\"value2\",\"key3\":\"value3\"}"}

-Exam
{"body":"{\"countryCode\":\"66\",\"phoneNumber\":\"946369349\",\"password\":\"ds14045678\"}"}
Python Dictionary sample


myDict = [
{
"name":"Mike James",
"age":32,
"country":"United Kingdom"},
{
"name":"join fford",
"age":32,
"country":"United Kingdom"}
]

for x1 in range(len(myDict)):

howto use list in python function

list =[]
detail = {}


for i in range(len(rows)):

detail['NO'] = (i)+1
detail['dist_from'] = rows[i][0]
detail['dist_to'] = rows[i][1]
detail['rate'] = rows[i][2]
detail['vehicle_type'] = rows[i][3]
detail['Item_code'] = rows[i][4]
detail['modified_date'] = json.dumps(rows[i][5], default=str)
detail['staff_uid'] = rows[i][6]

list.append(detail)
detail = {}
return {
'List':list
}