Computer Science, asked by radiumsrinivas686, 9 months ago

explain indexing and slicing in series​

Answers

Answered by adarshkumar6488
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 alosiouscj96009
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