- 1
What is meant by string indices must be integers?
2 Antworten
0
To answer this question you can think of a problem where you start counting from 0 to onwards , the first thing that comes to mind is whenever you start counting a similar group of objects you say 1,2,3,4....n
Similarly when you count anything in programming , let's say in this scenario a string , which is a group of characters you start to count but this time from 0 . You don't say 1.1,1.2,1.3 as that is not easy to follow for the designer of the language himself or neither to you .