Or things that shock devs coming to Python from compiled languages.
Even faster:
ls = list(range(N))
187 µs ± 45 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
yep, I wrote about this in one of the previous articles and it's for the same reason why `map(int, ...)` is faster than `(int(i) for i in ...)`
Even faster:
ls = list(range(N))
187 µs ± 45 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
yep, I wrote about this in one of the previous articles and it's for the same reason why `map(int, ...)` is faster than `(int(i) for i in ...)`