Remix.run Logo
semiinfinitely 3 hours ago

your second function is the type of bad code you get from people trying to program python like its c

wwfn 7 minutes ago | parent [-]

Absolutely! 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.