for i in [1, 3]:
    if self.value[i] != other.value[i]:
        return self.value[i] > other.value[i]
return False
One liner function for sorting a string list of lists in ascending, descending order based on varying criteria in python