Skip to lesson
Python sequences
Indexing
Python sequences
Indexing
Slicing
Comparison
Copying
Indexing
Reset lesson
Sequence
List
Tuple
String
seq =
Update sequence
Examples
Letters
Numbers
a–z
Empty
Start
included
Omit
Stop
excluded
Omit
Step
Omit
Try a slice
[:]
[::2]
[::-1]
[-5:-1]
Show negative indices
Positive index
Negative index
Expression
seq[2]
→
Returned value
'c'
str
Index
−
+
Index
−11
0
10
Reset
Previous
Play slice
Next
Ready at start
Speed
0.5×
1×
2×