thirty is a string with 3 or more letters.
Write a simple expression to return the last three characters in thirty.
I answered this question in Python, since specific programming language is not given.
Code:
# Function to return last three characters of string
def three_char(string):
temp = len(string)
return string[temp-3:temp]
# Give string here
string = "thirty"
# Taking the returned value and printing it
print(three_char(string))
Code screenshot:
Output:
Get Answers For Free
Most questions answered within 1 hours.