python - Loop through list of dictionaries simlutaneously -
i have 2 lists of dictionaries like:
a=[{"name":"jd","lat":12.1231,"long":10.123},{"name":"wq","lat":-1.21313,"long":7.31}] b=[{"name":"jd","time":datetime.datetime(1,2,3)},{"name":"wq","time":datetime.datetime(4,5,6)}]
i want loop through 2 simultaneously:
for i,j in a,b:
i
valueerror: many values unpack
also
for i,j in zip(a,b):
i not output @ all.
zip(a,b) empty list.
how should go this?
have @ zip
for i,j in zip(a,b):
Comments
Post a Comment