An efficient way to merge and sort two sorted lists, the overall complexity i believe is n log (n), I adapted it for Py3