pyassistant

Custom Sort Strings

Given a list of strings, return a new list with the strings in sorted order, except group all the strings that begin with 'x' first.

Example:

Input:
['mix', 'xyz', 'apple', 'xanadu', 'aardvark']
Output:
['xanadu', 'xyz', 'aardvark', 'apple', 'mix']

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.