You can download this code by clicking the button below.
This code is now available for download.
This function accepts a list as an argument and returns a sorted list. The sorting is based on the string representation of the elements in the list, ignoring case.
Technology Stack : Built-in function sorted, lambda expression
Code Type : List sort
Code Difficulty : Intermediate
def a_sorted_list(items):
return sorted(items, key=lambda x: x.lower())