When positional indices are used for __________, the value at end index position is excluded.
When positional indices are used for __________, the value at end index position is excluded.
Solution
✅ Correct Option: 2
In slicing, the syntax is seq[start:end]. It returns elements from the start index up to, but not including, the end index. For example, if s = "PYTHON", then s[1:4] gives YTH, and the element at index 4 is left out.
Option 1: indexing picks a single element at the given position, so nothing is excluded. For example, s[4] gives O.
Related questions:
2026: 23 May Shift 1
2025: 27 May Shift 2
2025: 13 May Shift 2