Insertionsort in Python improvements