我正在尝试使用计数器和列表来输入尺寸然后存储它,但是我被
击中了列表分配索引超出范围
即使您将范围设置为计数器的值
array = ["a","b","c","d"]
inputJson = {"a":1,"z":2}
if all(k in array for k in inputJson):
print("Ok..")
else:
print("Error!")
# --> Error!
答案 0 :(得分:0)
for (int index = 0; index < image.size(); index++) {
Log.d("Upload request", "requestUploadSurvey: survey image " + index + " " + image.get(index));
File file2 = new File(image.get(index));
RequestBody surveyBody = RequestBody.create(MediaType.parse("image/*"), file2);
multipartTypedOutput[index] = MultipartBody.Part.createFormData("imageFiles[]", file2.getPath(), surveyBody);
}