Answer and explanation

Correct answer: D. `'netwo'`

  1. Step 1: Slicing includes the start index and excludes the end index.
  2. Step 2: Characters 0 to 4 are 'netwo'.
Answer
`'netwo'`.
Why not the others: `'netw'`, `'etwor'` and `'krowt'` 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.