what do you mean by index? what is the key role of indexes in python string?
Answers
Answered by
1
Answer:
Python index() built-in function is used to return the index value of the first occurrence of a substring from the input string if the substring is found. If the substring specified is not found, then it raises an exception.
Strings are ordered sequences of character data. Indexing allows you to access individual characters in a string directly by using a numeric value. String indexing is zero-based: the first character in the string has index 0, the next is 1, and so on.
Explanation:
Please mark me as Brainlist
Similar questions
Sociology,
1 day ago
Computer Science,
1 day ago
English,
1 day ago
Social Sciences,
3 days ago
Math,
8 months ago
English,
8 months ago
Math,
8 months ago