pyassistant

String Middle Surrounded

Given a list of strings, return a new list where all the strings of the original list have been changed to a new string, where the original string is now in the middle of the new string surrounded by 3 copies of the original string.

Example:

Input:
['hello', 'world', 'python']
Output:
['hellohellohellohello', 'worldworldworldworld', 'pythonpythonpythonpython']

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.