Sorting multiple lists A and B by the value in B in python