def bubblesort(nums):
for i in range(len(nums)-1):
for j in range(len(nums)-i-1):
if nums[j]>nums[j+1]:
nums[j],nums[j+1]=nums[j+1],nums[j]
return nums
nums=[3,123,34,43,0,3,6,8]
print(bubblesort(nums))