What can we use to get the characters from index 2 to index 4 (llo) in txt = "Hello, World" in this question answer will be x=txt[2:4] but is show correct answer is x=txt[2:5]. please explain the answer.
Created 1 year ago
1065
Views
1
Comments
The txt[2:5]
syntax is used to get a substring of a string.