print(text1[2:5]) #Get characters from pos 2 to pos 5 (not included) print(text1[:5]) #Get characters from start to pos 5 (not included) print(text1[2:]) #Get ...
# It means taking elements from one given index to another given index. # We pass slice instead of index like this: [start:end]. # We can also define the step, like this: [start:end:step]. # If we don ...