+ 1

item['images'] = [x for ok, x in results if ok]

what does this loop do.is it a nested loop

30th Nov 2016, 3:07 PM
Mayank Motwani
Mayank Motwani - avatar
1 Respuesta
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
30th Nov 2016, 3:41 PM
aruluth
aruluth - avatar