SLICE
Description
SLICE
takes string (or list) and two index numbers and returns a string that is a "slice" of the original form the first index up to, but not including, the second index.
Note that indexes start at 0, so in the string "bla", the character "b" is at index 0 and the character "a" at index 2.
Example with String
This will return 'bbb'
.
Example with List
This will return [2, 3]
.
Last updated