Can anyone tell me what is happening behind the scenes when these 2 are executed?:
I believe (correct me if i am wrong) in the first example it just loops 100 times and calls append(0) on the list.
No idea, how second one is executed.
listOne = [0 for i in range(100)] listTwo = [0] * 100
I believe (correct me if i am wrong) in the first example it just loops 100 times and calls append(0) on the list.
No idea, how second one is executed.