Generation

generate functionSun, 13 Nov 2022

Sort a list except for the first value

def sort_list_except_first(l): sorted_list = sorted(l[1:]) sorted_list.insert(0, l[0]) return sorted_list

Want to kickstart your project?Use the new AI Studio to create your code