Slicing is the process of obtaining a portion (substring) of a string by using its indices.
Given a string, we can use the following template to slice it and obtain a substring:
startis the index from where we want the substring to start.
endis the index where we want our substring to end.
The character at the
end index in the string, will not be included in the substring obtained through this method.