how to loop through columns and rows in excel and add a string to columns
and rows and make a key value pair?
#am getting columns and rows from excel by using xlrd in python?
host = '..................'
opinion = 'do'
columns = {"a1","a2","a3"}
rows = {"b1","b2","b3"}
mynums = 1234,4562,8521,6592
key = "k"
value = "V"
我如何循环显示列和行以获取类似以下格式的输出?
mine = {"k":"a1","V":"b1"} #post or put only works if it has this format
num = 1111
mine = {"k":"a2","V":"b2"}
num = 2222
mine = {"k":"a3","V":"b3"}
num = 333
if opinion == 'd0'
req2 = req.get(host=host)
if mine.json() in req2
req3 = req.put(host=host, json='how to loop here')
else:
request = req.post(host=host, mynum='how to loop here 'json=#how do i loop here )
我如何遍历每一列,每一行和mynums并执行request.put或request.post。如何在python中以这种格式制作json?请帮帮我