def bubbleSort(arr,length):
for j in range(length):
for i in range(length-1):
if arr[i] > arr[i+1]:
arr[i],arr[i+1] = arr[i+1],arr[i]
return arr
if __name__ == "__main__":
li=[1, 3, 10, 9, 21, 35, 4, 6]
s=len(li)
print(bubbleSort(li,s))