Q:

Write a Python function to get a string made of 4 copies of the last two characters of a specified string (length must be at least 2).

0

Write a Python function to get a string made of 4 copies of the last two characters of a specified string (length must be at least 2).

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def insert_end(str):
	sub_str = str[-2:]
	return sub_str * 4

print(insert_end('Python'))
print(insert_end('Exercises'))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now