+ 2

How to separate last 3 string in the word? Give the solution in program

example: input: apple orange output: ple nge

22nd Jul 2018, 3:59 PM
Nikash
1 Answer
+ 4
I didn't test it, but this should work in python: string = 'apple orange' for word in string.split(' '): print(word[-3:], end=' ')
22nd Jul 2018, 4:05 PM
Anna
Anna - avatar