explain indexing and slicing in series
Answers
Answered by
2
Answer:
Strings in python support indexing and slicing. To extract a single character from a string, follow the string with the index of the desired character surrounded by square brackets ([ ]), remembering that the first character of a string has index zero.
>>> what = 'This parrot is dead'
>>> what[3]
's'
>>> what[0]
'T'
Explanation:
Answered by
3
Answer:
"Indexing" means referring to an element of an iterable by its position within the iterable. "Slicing" means getting a subset of elements from an iterable based on their indices.
Explanation:
Similar questions
Math,
4 months ago
English,
9 months ago
Business Studies,
9 months ago
Accountancy,
1 year ago
Math,
1 year ago
English,
1 year ago