Explore the World's Best Ideas
Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.
Choosing between slice() and islice() is a trade-off between memory usage and iteration speed. slice() is faster, but requires more memory, whereas islice() allocates a constant amount of memory, but is slower.
Use slice() when:
Use islice() when:
2
8 reads
MORE IDEAS ON THIS
slice(stop)
slice(start, stop, [step])
2
11 reads
islice(iterable, stop)
islice(iterable, start, stop, [step])
2
7 reads
CURATED FROM
IDEAS CURATED BY
Alt account of @ocp. I use it to stash ideas about software engineering
🐍 Python docs & Stack Overflow
“
Other curated ideas on this topic:
The slower you go the further you’ll get in your fitness journey. Fast results may be very tempting, but every shortcut comes at a price you won’t be willing to pay.
The faster your body changes, whether it is weight loss or muscle gain, the more o...
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates