still trying to crack parts of code written by a colleague who took a new job. The following has me stumped.
sidd1_fractions = [ ([0.0] * (sidd1_size + 2*flanking_size))[:] for x in range(labels.max()+1) ]
Here, he is setting up a series of lists (or arrays) filled with zeros. Not shown is that in later steps he fills these up with data. So this is basically a placeholder for future data.
My question is that what is the purpose of
[:]
? It normally indicates to slice an entire list but I have seen very similar code which lacks the [:].