1import requests
2url= "path/to/api"
3# Final Payload -> payload = {'key1': 'value1', 'key2': 'value2', 'keys[0]': 's1', 'keys[1]': 's2', 'keys[2]': 's3', 'keys[3]': 's4', 'keys[4]': 's5'}
4keys=['s1','s2','s3','s4','s5']
5data={'key1': 'value1', 'key2': 'value2', 'keys[]': keys}
6r = requests.post(url, data)
7res = r.json()
8print(res)