@arkiboys Hi again, I'm back!
To get the first 3 characters from a string, we can use the array range notation value[0:3]
0 means start 0 characters from the beginning, and 3 is end 3 characters from the beginning.
To get the last 2 characters we get to use negative numbers! value[-2:]
returns the last 2 characters. Don't do value[-2:0]
, that won't give you anything. Alternatively can do value[ len(value) - 2 : len(value)]
.
This gets you the characters, not specificly letters. If you want to differentiate letters and numbers and other symbols, a different tactic is needed.