我是python脚本的新手。我想知道如何在python代码中定义数组并分配以下值。
additional_fields [1024] = 5
additional_fields [1355] = 36
定义以上内容后,我想在post方法中传递值
作为下面提到的additional_fields=d1
headers={'Content-Type':'application/x-www-form-urlencoded','Accept':'application/json','Authorization': zc}
data=dict(userid='test',email='test@test.com',password=Password,firstname=FirstName,lastName=LastName,level=Level,force_change=ForceChange,valid=Valid,send_notification_email=SendNotificationEmail,additional_fields=d1)
response = requests.post(url, data=data, headers=headers)