I need to send out request one by one by different id and I have following code but I am wondering if it is good idea to use syntax like list(map(lambda x: xxxx), id_list)
or i should just use one-for loop for it?
id_list = [1,3,4,100,83,99]
headers = {'content-type': 'application/json'}
url = "https://www.test.com/api/v6/test.json"
response = requests.delete(url, data=json.dumps(payload), headers=headers,auth=HTTPBasicAuth(token, 'api_token'))
list(map(lambda x: requests.delete(url, data=json.dumps({'id': x}), headers=headers,auth=HTTPBasicAuth(token, 'api_token')), id_list))