1st = "abcdefghij"
2st = st[:-1] # Returns string with last character removed
1string = "Hello World"
2string = string[:-1] # This overwrite the string to have the last letter removed.
3print(string)# Then we print the variable string
1# string [start:end:step]
2string = "freeCodeCamp"
3print(string[0:len(string)-1]) # freeCodeCam
4print(string[0:5]) # freeC
5print(string[2:6]) # eeCo
6print(string[-1]) # p
7print(string[-5:]) # eCamp
8print(string[1:-4]) # reeCode
9print(string[-5:-2]) # eCa
10print(string[::2]) # feCdCm