Ask Question

Given a string, return a new string made of 3 copies of the last 2 chars of the original string. The string length will be at least 2. extra_end ('Hello') → 'lololo' extra_end ('ab') → 'ababab' extra_end ('Hi') → 'HiHiHi'

+2
Answers (1)
  1. 10 August, 05:36
    0
    def extra_end (str):

    return 3 * (str[-2:])
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Given a string, return a new string made of 3 copies of the last 2 chars of the original string. The string length will be at least 2. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers