Z12869: Difference between revisions
move debug and tab indents |
No edit summary |
||
Line 14: | Line 14: | ||
"Z61K1": "python" |
"Z61K1": "python" |
||
}, |
}, |
||
"Z16K2": "def Z12741(Z12741K1, Z12741K2):\\\r\n\tif len(Z12741K1) != len(Z12741K2):\r\n\t\treturn False\r\n\r\n\t# Define a custom sorting function. It will sort elements first by type, then by value\r\n\tdef custom_sort(element):\r\n\t\treturn (str(type(element)), element |
"Z16K2": "def Z12741(Z12741K1, Z12741K2):\\\r\n\tif len(Z12741K1) != len(Z12741K2):\r\n\t\treturn False\r\n\r\n\t# Define a custom sorting function. It will sort elements first by type, then by value\r\n\tdef custom_sort(element):\r\n\t\treturn (str(type(element)), element)\r\n\r\n\ttry:\r\n\t\treturn sorted(Z12741K1, key=custom_sort) == sorted(Z12741K2, key=custom_sort)\r\n\texcept TypeError:\r\n\t\t# If there is a TypeError while sorting, it means there were non-comparable types in the list\r\n\t\treturn False" |
||
} |
} |
||
}, |
}, |
Revision as of 05:39, 27 February 2024
This page displays in a limited way without JavaScript.