如何同时迭代多个列表?

2024-05-18 15:21:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我有个谜语 我想做的是有一个“for in”,它在3个变量上循环请求.POST以及请求.FILES 我所做的是:

images = request.FILES.getlist('image')
titles = request.POST.getlist('title')
captions = request.POST.getlist('caption')
for image,title,caption in images,titles,captions:

那似乎不管用 有什么解决办法吗?在


Tags: inimagefortitlerequestfilespostimages

热门问题