data=[5,1,2,9,1,6,1,3,1,4,1,2,9,6]
n=len(data)
for i in range(n-1) :
for j in range(i+1,n) :
if data[i] > data[j] :
tmp = data[i]
data[i] = data[j]
data[j] = tmp
print(data)
data=[5,1,2,9,1,6,1,3,1,4,1,2,9,6]
n=len(data)
for i in range(n-1) :
over = True
for j in range(n-i-1) :
if data[j] > data[j+1] :
tmp = data[i]
data[i] = data[j]
data[j] = tmp
over = False
if over :
break
print(data)