Algorithm For Insertion Sort In Python