Answers for "How could you sort a list of strings, my_list, in order of the length of the strings ascending (smallest to largest)? Group of answer choices"

0

sort a list by length python

#Input
def sort():
	lst = [orange, ant, phone, banana, notebook)
	lst2 = sorted(lst, key=len)
    return lst2
           
#Output : [ant, phone, banana, orange, notebook)
Posted by: Guest on May-03-2020

Code answers related to "How could you sort a list of strings, my_list, in order of the length of the strings ascending (smallest to largest)? Group of answer choices"

Python Answers by Framework

Browse Popular Code Answers by Language