Given an array of integers, sort the elements in the array in ascending order. The bubble sort algorithm should be used to solve this problem.
def insertion(array):
for i in xrange(1,len(array)):
cur = array[i]
k = i
while k > 0 and cur < array[k-1]:
array[k] = array[k-1]
k -= 1
array[k] = cur