Setting it to True sorts the list backwards, in desceding order. The default value is False, meaning the list is sorted in ascending order. It takes a Boolean value, meaning the value is either True or False. It specifies whether the list will be sorted in ascending or descending order. reverse is the first optional parameter.sort() accepts two optional parameters.It sorts list elements in either ascending or descending order.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |