CBSE Class 12 Computer Science Question 52 of 105

Python Revision Tour II — Question 1

Back to all questions
1
Question

Question 1

What is the internal structure of python strings ?

Answer

Strings in python are stored as individual characters in contiguous memory locations, with two-way index for each location. The index (also called subscript) is the numbered position of a letter in the string. Indices begin 0 onwards in the forward direction up to length-1 and -1,-2, .... up to -length in the backward direction. This is called two-way indexing.