pyassistant

Concatenate First and Last Characters

Given a list of strings, write a function to return a new list where all the strings of the original list have been changed to a concatenation of the first and last characters of each string.

Example:

Input:
['hello', 'world', 'python']
Output:
['ho', 'wd', 'pn']

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.