slicing_lvl_1.md

April 23, 2022 ยท View on GitHub

Slicing - Level 1

What is the result of each of the following statements if x = 'abcdefgh'

  1. x[:]
  2. x[2:]
  3. x[2:2]
  4. x[2:3]
  5. x[-1:]

Solution

Click here to view the solution.