Every programmer wishes to write some code, which is both elegant, and readable. A master piece to reference to... And there may not be a single programmer, who said at least once in their life time that, "If I had time, I'd rewrite it" or any similar one. Today, let's discuss, how the idea of sorting a list of list went on, I had to sort a list of lists, that's the result of a search, comes from Web Service. After that, the result is extracted from the XML document that's returned and formatted for front end. So, now all the data is in the form of strings. And I'm ended up with the task of sorting a list of list of strings, based on different items in the inner lists @ different times. And Obviously we can't compare the data as strings, we have to convert them into their proper data type before comparison. Since, I works on a Python based project, First thing, that came to mind is to use, sorted inbuilt function, and pass it a functi...
To share bits of knowledge, experiences, lessons & fun stuff from my life.