Bubble sort problems : I want to create a program which sorts the array using bubble sort technique. but only the first iteration happens, can you help why

        a=[10,4,5,2,0,6]
        def srt(element):
                element1=element[:]
                element2=element[:]
                idx=1
                for x in element:
                    for y in element2[idx:]:
                         if x>y:
                            element1[idx]=x
                            element1[idx-1]=y
                            print(element1)
                            idx+=1
                         else:
                            pass 
    
    want to show all steps of the sort