extra_end

Take a string as input, print out a new string made of 3 copies of the last 2 chars of the original string. The string length will be at least 2.

This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.

Test 1

Input:

'Hello'

Output:

'lololo'

Test 2

Input:

'ab'

Output:

'ababab'

Test 3

Input:

'Hi'

Output:

'HiHiHi'

Test 4

Input:

'Candy'

Output:

'dydydy'

Test 5

Input:

'Code'

Output:

'dedede'