Basic sorts in python