3 ms·
Python's list sum are funny like that. x+=y is equivalent to x.append(y) x = x + y creates a new list, then assign it to x (highly inefficient in a loop)
by G4E 6y ago
Python's list sum are funny like that.
x+=y is equivalent to x.append(y)
x = x + y creates a new list, then assign it to x (highly inefficient in a loop)