Oct-30-2017, 10:51 AM
If device.data is a list,
data = [b for b in device.data]
is meaningless. It's the same as data = device.data
. Anyway! The whole [b for b in device.data]
means "append to data an element ( b) for any element in the list ( device.data ). It the same as:for b in device.data: data.append(b)See https://python-forum.io/Thread-Comprehen...xpressions