![]() ![]() The definition of sorted() states that it will return a new list whatever the input may be. You can also use sorted() to sort tuples and sets just like numbers: > tuples = ( 4, 10, 1, 7) Since sorted() function returns the list in order, we can assign the returned list to another variable: > num_list = Ī new variable sorted_list is created which holds the output of sorted(). sorted() being called, returns an ordered list of values. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |