-Slicing is a string operation for extracting a part of the string, or some part of a list.- We use ( : ) operator for slicing.Example-s="Mystring123"print(s[2:5]) will give "str"
- We use ( : ) operator for slicing.
Example-
s="Mystring123"
print(s[2:5]) will give "str"