python - Sorting by key and value in case keys are equal -
recommends:
It is not important to try and perform a sort operation Some known separators (such as '=') will change the sort order due to their effect on the string value on some combined string of both names and values.
If this is the case, what would be an efficient way of doing so? Looking for the starting type equal key for the second to move?
Just sort the list of tuples (name, value) - Python gives you the dictionary order.
Comments
Post a Comment