i want to append two list as in order to do a pair wise sort of elements [[-1, -1], [-1, -1], [4, 2], [4, 1]]
to make as [[-1, -1], [-1, -1], [4, 1], [4, 2]]
it may be that i append two list [4,1]
and [4,2]
into a new list but a.append(list)
gives [4, 2, [4, 1]]
. how can i do a pair wise sort or append list[1]=[4,2]
and
list[2]=[4,1]
as in order to get newlist as [[4,1],[4,2]]
instead of [4, 2, [4, 1]]
also how to do pair wise sort on them directly without appending if the list is as [[-1, -1], [-1, -1], [4, 2], [4, 1]]
to [[-1, -1], [-1, -1], [4, 1], [4, 2]]