my_new_list = [6, 3, 8, "12", 42] def OrganizeList(myList): for item in myList: assert type(item) == str, "Word list must be a list of strings" myList.sort() return myList print(OrganizeList(my_new_list))
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter