+ 1
item['images'] = [x for ok, x in results if ok]
what does this loop do.is it a nested loop
1 Odpowiedź
0
list comprehensions.
its same as:
s = []
for ok, x in results: # maybe there are tuples of two elements in results
if ok:
s+=[x]
item['images'] = s