Bubble sort, insertion sort and selection sort algorithms in python