Sequence Data types in Python
- str: This is sequence of character
- list: this is sequence of objects which can be altered
- tuple: this is sequence of objects which cannot be altered
- range: this is generally a numerical sequence
indexing and slicing on sequences
-
Indexes in python

-
Slicing in python: For all sequence types we can use slicing
[<start-index>:<stop-index>:<step>]
# default value
<start-index> = 0
<stop-index> = length -1
<step> = 1
Common sequence operations
- Refer Here
- Refer Here for indexing, slicing and common sequence operatios.
Find out if the below are mutable or immutable
- str
- list: List is the only sequence type which is mutable
- tuple

Write a for loop to print each item of
- str
- list
- tuple
- range
for index = range(1,10,2):
print(index)

