It is not a new function, it is a variable that @Manj_P assigned earlier using the step syntax to reverse the string:
That syntax says take the whole string and use a step of -1 to get each character in reverse order. People sometimes define this as a function to help simplify their code:
def reverse(input):
return input[::-1]
Which can then be used to achieve your desired result AFAICT:
reverse(name[-3:])
@Manj_P is just doing all of the work inline here rather than extracting the helper variable reverse. There are extra parentheses here which may be confusing to read which is why the helper variable or function version is more readable.