Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
Indexing & Slicing
High Priority
22 min read
Updated June 6, 2026
Get Premium
Subscribe to unlock full access to all premium content
Subscribe Now
Reading Progress
0%
On this page
The Basic Slice: s[start:stop]
Defaults: Omitting start, stop, or Both
Negative Indices in Slices
The Third Argument: step
Negative Step: Reversing a String
Slicing Past the End Is Safe
Practical Slicing Recipes
What Each Slice Costs
Quiz
Vote/Request Content
Aa
Notes
Star
Complete
Ask AI
Exercise: String Bas...
Notes
Star
Complete
Ask AI
Exercise: Indexing &...