Would someone be able to help me understanding how can I pass values from multiple lists as function parameters? I'm trying to update email for each of myemailId with url that includes customerId.
my code so far:
emailId = [732853380,7331635674]
customerId = ['cust-12345-mer','cust-6789-mer']
for x, y in zip(emailId, customerId):
def update_email(emailId, token, user, notes="https://myurl.com/customer?customerId =" + customerId):
headers = { 'accept': 'application/json',
'Content-Type': 'application/json',
'token': token,
'user': user}
endpoint = 'email/'
body = {'emailId': emailId, 'user': user, 'notes': notes}
requests.put(url = host + endpoint, headers = headers, json=body)
return True
but receiving this error that is corresponding to the line that starts with def update_email
...:
TypeError: must be str, not list
Thanks in advance!