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.
slice(stop)
slice(start, stop, [step])
2
11 reads
islice(iterable, stop)
islice(iterable, start, stop, [step])
2
7 reads
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
Alt account of @ocp. I use it to stash ideas about software engineering
🐍 Python docs & Stack Overflow
“
More like this
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving & library
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Personalized recommendations
—
—
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