Tag: Tricks
-
How to Custom Sort a Python String List
If you have a list of string items and you want to perform a custom sort order (ie not alphabetical), you can use the key parameter in the list.sort() method to define the order.
If you have a list of string items and you want to perform a custom sort order (ie not alphabetical), you can use the key parameter in the list.sort() method to define the order.