Answer and explanation

Correct answer: B. `'security'`

  1. Step 1: Slicing includes the start index and excludes the end index.
  2. Step 2: Characters 0 to 7 are 'security'.
Answer
`'security'`.
Why not the others: `'securit'`, `'ecurity'` and `'ytiruces'` do not fit.

Practise more Python programming and algorithms.

Free questions with an explanation for every one, and full timed Saudi Secondary School Certificate mock tests.