3 ms·
your second function is the type of bad code you get from people trying to program python like its c
by semiinfinitely 6mo ago
your second function is the type of bad code you get from people trying to program python like its c
- wwfn 6mo agoAbsolutely! And the list.pop version is multiple orders of magnitude slower. But I took the prompt to be asking for in-place modification of the existing list. Comprehension does not do that.
- ktm5j 6mo agoIs there a pythonic way to satisfy the prompt? IE without making a new list?
- nomel 6mo agohttps://news.ycombinator.com/item?id=47652757 https://news.ycombinator.com/item?id=47652757